[Haskell-beginners] Either Monadic Trouble

Nicolas Pouillard nicolas.pouillard at gmail.com
Mon Nov 9 06:40:38 EST 2009


Excerpts from Henk-Jan van Tuyl's message of Mon Nov 09 11:10:07 +0100 2009:
> 
> Either is not a monad, you can check this by typing
>    :i Either
> in GHCi; you will not see a line like
>    instance Monad Either
> in the result. Compare this to
>    :i Maybe

In fact the Either Monad instance is defined in the 'transformers' (or 'mtl')
packages.

However for this reason among others you may want to use the 'attempt'[1]
package instead of Either.

[1]: http://hackage.haskell.org/package/attempt-0.0.0

-- 
Nicolas Pouillard
http://nicolaspouillard.fr


More information about the Beginners mailing list