MonadFail proposal (MFP): Moving fail out of Monad

Johan Tibell johan.tibell at gmail.com
Wed Jun 10 13:00:35 UTC 2015


An idea. Could the new desugaring be the same as for normal functions with
a missing case? Code that uses fail would have to add the constraint still,
but code that really didn't want to use fail would 1) get a warning about
an incomplete pattern match and 2) get a runtime error for the failed
pattern match produced by GHC. Is there anything I'm not thinking of here
why this wouldn't work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150610/cfc4aca3/attachment.html>


More information about the Libraries mailing list