Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Monad transformers and MonadPlus (Daniel Fischer) ---------------------------------------------------------------------- Message: 1 Date: Fri, 30 Jul 2010 14:48:17 +0200 From: Daniel Fischer <daniel.is.fisc...@web.de> Subject: Re: [Haskell-beginners] Monad transformers and MonadPlus To: beginners@haskell.org Message-ID: <201007301448.17738.daniel.is.fisc...@web.de> Content-Type: text/plain; charset="utf-8" On Friday 30 July 2010 13:56:44, Antoine Latter wrote: > You could always add a MondPlus instance to IO directly (or a newtype > wrapper). > > 'mplus' would set up exception handling and 'mzero' would through an > exception. You might want to limit it to a subset of exceptions, though. Once upon a time, there was a MonadPlus instance for IO. However, one of the laws a MonadPlus instance should satisfy is m >> mzero === mzero You can't have that in IO, since there's no unPutStrLn and such. Therefore, the MonadPlus instance for IO was removed. ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 25, Issue 58 *****************************************