
16 May
2011
16 May
'11
5:05 p.m.
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
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 Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe