[Haskell-cafe] Why Either = Left | Right instead of something like Result = Success | Failure

Donn Cave donn at avvanta.com
Fri May 28 14:44:20 EDT 2010


Quoth Vo Minh Thu <noteed at gmail.com>,
...
> Control.Monad.Error provides an instance for Either.

... in the mtl transformer library, in case anyone else besides
myself didn't know that. And I see it has to be there because
it depends on the Error typeclass.

(So the documentation for Control.Monad.Error, is mistaken, where
at the top it says

  Example type:
      Either String a

... which should be

      Either Error a

... ?  Though I can't really be sure what the documentation is
trying to say.)


	Donn Cave, donn at avvanta.com



More information about the Haskell-Cafe mailing list