need help w/ monad comprehension syntax

2001-02-15 Thread Konst Sushenko
hello, i am having troublegetting my program below to work. i think i implemented the monad methods correctly, but the function 'g' does not type as i would expect. Hugs thinks that it is just a list (if i remove the explicit typing). i want it to be functionally identical to the function

need help w/ monad comprehension syntax

2001-02-15 Thread Tom Pledger
Konst Sushenko writes: | what am i missing? : | --g :: State String Char | g = [ x | x - return 'a' ] Hi. The comprehension syntax used to be for monads in general (in Haskell 1.4-ish), but is now (Haskell 98) back to being specific to lists. Does it help if you use do-notation instead?