On Wed, Sep 05, 2007 at 03:35:03PM +1200, ok wrote: > I've been thinking about making a data type an instance of MonadPlus. > From the Haddock documentation at haskell.org, I see that any such > instance should satisfy > > mzero `mplus` x = x > x `mplus` mzero = x > mzero >>= f = mzero > v >> mzero = mzero > > but is that all there is to it? Are there no other requirements for > MonadPlus to make sense? > > I also wondered why, once MonadPlus was added to the language, the > definition of ++ wasn't changed to > (++) = MonadPlus > (with the MonadPlus instance for [] defined directly).
It was. They changed it back in Haskell 98, as part of a grand program of dumbing down the langauge... Cale Gibbard says {{{I get the impression there were a lot of people on the Haskell 98 committee who really really hated polymorphism.}}}. Stefan
signature.asc
Description: Digital signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe