[Haskell-cafe] the way to fail

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Wed Sep 24 06:45:55 EDT 2008


Am Mittwoch, 24. September 2008 11:36 schrieb Jason Dusek:
>   Whenever `fail` comes up, there are usually remarks to the
>   effect that it doesn't really belong in the definition of
>   `Monad`. Where does `fail` belong? Could it go in `Arrow`?
>
> --
> _jsn

In my opinion, fail s should be somehow equivalent to mzero for any string s.  
So it should go into MonadPlus.  Or we should split MonadPlus into MonadZero 
(with mzero) and a reduced MonadPlus (with mplus) and then fail should 
obviously go into MonadZero.

Best wishes,
Wolfgang


More information about the Haskell-Cafe mailing list