[Haskell-beginners] Re: Either Monadic Trouble
Nicolas Pouillard
nicolas.pouillard at gmail.com
Mon Nov 9 16:00:02 EST 2009
Excerpts from Ertugrul Soeylemez's message of Mon Nov 09 21:44:44 +0100 2009:
> Nicolas Pouillard <nicolas.pouillard at gmail.com> wrote:
>
> > > 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.
>
> Either is still not a monad. Have a look at its kind.
OK, right Either is not but (Either e), where e must be in
the Error type class.
--
Nicolas Pouillard
http://nicolaspouillard.fr
More information about the Beginners
mailing list