
16 Dec
2010
16 Dec
'10
3:54 p.m.
On Thu, Dec 16, 2010 at 12:03 PM, John Smith
On 15/12/2010 14:31, Lennart Augustsson wrote:
Yes, I think there should be a MonadFail distinct from MonadPlus. Some types, like IO, are not in MonadPlus, but have a special implementation of the fail method.
Personally, I think fail should just be removed, but that would break existing code. The fail method was introduced for the wrong reasons (better error messages was the excuse).
Which other monads (other than MonadPlus subclasses) define fail?
STM is in MonadPlus, but I don't think pattern-match failure should be the same as STM.retry. Antoine