[Haskell-cafe] Either instance of Monad?
daniel.is.fischer at googlemail.com
Tue Feb 22 23:33:20 CET 2011
On Tuesday 22 February 2011 23:07:05, Yves Parès wrote:
> When importing Control.Monad.Error, it shows me that (Either e) is an
> instance of MonadFix, but not an instance of Monad.
> Isn't there a problem?
Prelude Control.Monad.Error> :i Either
data Either a b = Left a | Right b -- Defined in Data.Either
instance (Eq a, Eq b) => Eq (Either a b) -- Defined in Data.Either
instance Monad (Either e) -- Defined in Control.Monad.Instances
instance Functor (Either a) -- Defined in Control.Monad.Instances
instance MonadFix (Either e) -- Defined in Control.Monad.Fix
Works right here. With mtl-1.*, there's an (Error e) restriction on the
More information about the Haskell-Cafe