haskell
Is there an haskell EDSL for writing lexers?
Mixing the lexer and parsing phases in one phase sometimes makes Parsec parsers less readable but also slows them down. One solution is to use Alex as a tokenizer and then Parsec as a parser of the to[详细]
2023-04-12 22:21 分类:问答Error loading function from file in GHCi
I\'m completely new to Haskell. To grasp the basics I\'ve started working through \'Learn you a Haskell for Great Good\'. I\'m stuck on the simple matter of loading a function from a file.[详细]
2023-04-12 21:43 分类:问答Using cabal with multiple GHC versions
I got both ghc6 and ghc7 on my desktop. To install new packages (for the specific ghc version), I use cabal with the flag --with-compiler=<ghc-dir> to specify开发者_C百科 for which ghc i want th[详细]
2023-04-12 21:27 分类:问答Haskell: Is there a safe/total version of (!!)?
I tried looking up Int -> [a] -> Maybe a on hoogle, but no luck. I feel like this should be in a stan开发者_Python百科dard library somewhere, but I don\'t know where.There is a library called S[详细]
2023-04-12 20:33 分类:问答How do you define state in Haskell?
How do you define state in Haskell? My first idea was to use algebraic data types. I\'ve also heard about the state monad, but I don\'t really know what it is.[详细]
2023-04-12 20:21 分类:问答Function "who am I" accessible from function and usable as key?
I would like to use a collection of function names as Data.Map keys, and have the key for each function automatically available from within that function. I am willing to consider \"unsafe\" operation[详细]
2023-04-12 18:26 分类:问答A Haskell interpreter /w type definitions
Is开发者_运维知识库 there a Haskell interpreter that accepts type definitions or preferably all kinds of statements?[详细]
2023-04-12 17:28 分类:问答Folding over a polymorphic list in Haskell
I have a collection of records spread across a number of types in a large Haskell application that reference each other. All of the types involved implement a common typeclass. The typeclass contains[详细]
2023-04-12 17:17 分类:问答How can I give the type inference engine some hints?
In (very) modern GHC\'s, I can write this: {-# LANGUAGE TypeFamilies #-} -- consider this part \"library\" code, changeable at will[详细]
2023-04-12 16:46 分类:问答Why is this code not working? (combining two test functions)
module Data where data Cons a = Con (a -> Bool) deriving (Show) twoCons :: Cons a -> Cons a -> Cons a[详细]
2023-04-12 15:16 分类:问答