need help w/ monad comprehension syntax

Tom Pledger Tom.Pledger@peace.com
Fri, 16 Feb 2001 14:22:28 +1300


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?

Regards,
Tom