Probably because in the instance of Monad Either, fail has not been overloaded, and still has its default implementation: fail = error Whereas runErrorT explicitely catches the exception.
2011/5/16 Gracjan Polak <[email protected]> > > Hi all, > > A why question: Why: > > Control.Monad.Error Prelude> runErrorT (fail "msg") :: IO (Either String > Int) > Left "msg" > > but > > Control.Monad.Error Prelude> (fail "msg") :: (Either String Int) > *** Exception: msg > > ? > > -- > Gracjan > > > > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
