
30 Jun
2010
30 Jun
'10
2:21 a.m.
A reasonable case can be made for the existence of a monad that does something useful with fail. I don't think that that monad should be Either.
I don't mean to further derail the proposal, which I think is a worthy one, but what's the feeling on a complete deprecation of 'fail' and making 'pat <- ...' the same as 'let pat = ...'? I've never used it, not because I've never come across a case where it would be useful, but that I don't trust to remember the behaviour of 'fail' for this particular monad and even if I do, maybe my reader doesn't. So I prefer 'case xyz of { pat -> mzero/throw/whatever }'. It's more wordy but clearer. Are there uses out there that really rely on the conciseness afforded by refutable patterns?