
25 May
2008
25 May
'08
9:36 a.m.
On Sun, May 25, 2008 at 02:26:36AM +0200, Twan van Laarhoven wrote:
Ross Paterson wrote:
The proposal is to change these signatures back, specializing them to Maybe.
To retain most of the convenience I would propose we use MonadPlus instead, which is arguably where fail should have been put in the first place (*).
(*) Actually in a superclass MonadZero, but let's work with what we have now.
Also, for a map to be empty or not contain a particular key is not intrinsically an error; in particular the view functions are just views. If one wants to treat these cases as errors, it seems reasonable to mark this explicitly.