I am using mtl-2. Importing Control.Monad.Error doesn't work, I have to explicitly import Control.Monad.Instances.
2011/2/22 Daniel Fischer <[email protected]>: > On Tuesday 22 February 2011 23:07:05, Yves Parès wrote: >> Hello, >> >> 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 > <snip> > instance MonadFix (Either e) -- Defined in Control.Monad.Fix > <snip> > > Works right here. With mtl-1.*, there's an (Error e) restriction on the > instances. > > _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
