On 31/12/2011 13:18, Yves Parès wrote:
But still, I maintain my previous view. I could clarify that by saying that (e.g. for Maybe) we could separate it in two types, Maybe itself and its monad:

-- The plain Maybe type
data Maybe a = Just a | Nothing

-- The MaybeMonad
newtype MaybeMonad a = MM ( () -> Maybe a )

You've just reminded me of a painful time - lot's a scratching my head and saying "but these parser functions are monadic - the tutorial clearly says they're monadic - why does my every attempt at making the type an instance of Monad fail?"

Answer - I only had the equivalent of the Maybe type, and I was trying to force it where the MaybeMonad should go.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to