#2309: containers: specialize functions that fail in a Monad
sjanssen at cse.unl.edu
Mon May 26 16:08:01 EDT 2008
On Sun, May 25, 2008 at 01:28:45PM +0100, Neil Mitchell wrote:
> >> If mzero, there's less gained over Maybe, but still no guarantee of
> >> safety.
> > If a program has a safety problem with mzero, that anyway
> > needs to be detected. So I don't think that will have an
> > effect on overall program safety, it's an orthogonal safety
> > concern.
> I don't think this is the case.
> mzero vs. Nothing
> One doesn't crash, the other may crash depending on what is floating
> around. Perhaps I've used type inference extensively, and the actual
> decision of what mzero means is 10 functions away. Now its really
> hard to see the program is safe, versus not.
Can you name a single instance of MonadPlus in the standard libraries where
mzero uses error or undefined? The closest example I can think of is the
instance for IO which throws an exception, but this really isn't the same as
More information about the Libraries