17 May
2011
17 May
'11
5:05 a.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 <gracjanpolak@gmail.com>
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