Here's an example: In my paper "First Class Patterns" <http://citeseer.ist.psu.edu/tullsen00first.html>,
by defining the pattern combinators using MonadPlus, you get standard pattern matching with the Maybe
instance of MonadPlus and you get backtracking pattern matching with the [] (list) instance of MonadPlus.


- Mark

On Feb 12, 2005, at 10:08 AM, Benjamin Pierce wrote:

I have seen lots of examples that show how it's useful to make some type
constructor into an instance of Monad.


Where can I find examples showing why it's good to take the trouble to show
that something is also a MonadPlus? (I know there are many examples of
things that *are* MonadPluses; what I want to know is why this is
interesting. :-)


Thanks,

     - Benjamin




_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to