
27 Jun
2007
27 Jun
'07
1 a.m.
Hi,
I can see how this function can be useful. However, I am strongly
opposed to adding the general monadic version---not all monads support
graceful failure, and for monads that do not support it, the only
option is to throw a run-time exception, which is at odds with the
purity of Haskell (which leads to headaches when you try to write
robust code). I think that the "Maybe" version is perfectly adequate
but if we have to have an overloaded version, then we should use
"MonadPlus".
-Iavor
On 6/26/07, Bryan O'Sullivan
Chris Smith wrote:
Hmm. That would replace a function I write today if only it were:
+1 on the monadic variant, of which I have a copy just like Chris's.
http://www.haskell.org/mailman/listinfo/libraries