| Here's an even better idea: replace mfail with fail.
| It is, after all, the fail of the IO monad!
|
| Option 4'': Monad ((>>=), return, fail)
Unfortunately not, fail of IO fame has type
IOError -> IO a
and not
String -> m a
as Monad's new member.
Here's my suggestion:
o Monad ((>>=), return, fail)
o throw (thanks Frank) instead of fail for the IO operation
o raise for Haskell-2's exception mechanism (raise and handle)?
Cheers, Ralf
- mfail -> fail Philip Wadler
- Re: mfail -> fail Ralf Hinze
- Re: mfail -> fail Philip Wadler
