Mistake in Haskell wiki MonadError?

Derek Elkins ddarius at hotpop.com
Mon Dec 1 14:23:55 EST 2003


On Mon, 01 Dec 2003 18:10:44 +0000
Graham Klyne <gk at ninebynine.org> wrote:

> At:
> 
>    http://www.haskell.org/hawiki/MonadError
> 
> I see:
> [[
> instance Monad (Either e) where
>      return = Right
>      (Left e) >>= _ = e
>      (Right a) >>= f = f a
> ]]
> 
> Shouldn't that be:
> [[
>      (Left e) >>= _ = Left e
> ]]
> 
> ?

Yes, good thing it's on a wiki ;)



More information about the Haskell-Cafe mailing list