
7 May
2010
7 May
'10
8:02 p.m.
On May 7, 2010, at 4:54 PM, Limestraƫl wrote:
Personally I think fail is a terrible wart, and should be shunned.
So do I. I can't understand its purpose since monads which can fail can be implemented through MonadPlus.
As far as I can tell, its purpose is to essentially allow you to catch pattern match errors in pure code and turn them into a value, since Haskell calls fail whenever there is a failed pattern match. (I am not saying that this is a good idea, only that this is not something that you would simply get by using MonadPlus.) Cheers, Greg