ANNOUNCE: control-monad-failure and safe-failure

Folks, We are extremely happy to announce the control-monad-failure and safe-failure packages for error handling. control-monad-failure provides a basic notion of failure which does not commit to any concrete representation. It is just a version of the MonadError class without the annoying bits.
class MonadFailure e m where failure :: e -> m a
Instances are provided for several concrete representations of failure handling: Maybe, Either, ErrorT, Control.Exception.Throw, and []. safe-failure is a fork of Neil Mitchell's Safe package providing MonadFailure versions of several partial functions in the Prelude, which instead of failing with a runtime error fail with Failure.
head :: MonadFailure HeadFailure m => [a] -> m a
This is a joint release from the authors of the attempt and the control-monad-exception packages, and accompanying releases of those packages have been made making them adopt the MonadFailure interface. We have also created a wiki page explaining our reasons for following this path in: http://www.haskellwiki.org/Failure Thanks, Jose Iborra, Nicolas Pouillard and Michael Snoyman

Correction: the correct link is http://www.haskell.org/haskellwiki/Failure
2009/11/16 Michael Snoyman
Folks,
We are extremely happy to announce the control-monad-failure and safe-failure packages for error handling.
control-monad-failure provides a basic notion of failure which does not commit to any concrete representation. It is just a version of the MonadError class without the annoying bits.
class MonadFailure e m where failure :: e -> m a
Instances are provided for several concrete representations of failure handling: Maybe, Either, ErrorT, Control.Exception.Throw, and [].
safe-failure is a fork of Neil Mitchell's Safe package providing MonadFailure versions of several partial functions in the Prelude, which instead of failing with a runtime error fail with Failure.
head :: MonadFailure HeadFailure m => [a] -> m a
This is a joint release from the authors of the attempt and the control-monad-exception packages, and accompanying releases of those packages have been made making them adopt the MonadFailure interface. We have also created a wiki page explaining our reasons for following this path in:
http://www.haskellwiki.org/Failure
Thanks, Jose Iborra, Nicolas Pouillard and Michael Snoyman _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Eugene Kirpichov Web IR developer, market.yandex.ru

Excerpts from Michael Snoyman's message of Mon Nov 16 14:39:14 -0500 2009:
control-monad-failure provides a basic notion of failure which does not commit to any concrete representation. It is just a version of the MonadError class without the annoying bits.
Excellent! I've used MonadError in the past and it has been a little... warty; looking forward to using control-monad-failure for future projects. Cheers, Edward
participants (3)
-
Edward Z. Yang
-
Eugene Kirpichov
-
Michael Snoyman