[Haskell-cafe] About mplus
lemming at henning-thielemann.de
Wed Sep 5 03:21:27 EDT 2007
On Wed, 5 Sep 2007, ok wrote:
> On 5 Sep 2007, at 6:16 pm, Henning Thielemann wrote:
>> I think it is very sensible to define the generalized function in terms of
>> the specific one, not vice versa.
> The specific point at issue is that I would rather use ++ than
> `mplus`. In every case where both are defined, they agree, so
> it is rather frustrating to be blocked from using an operator
> which would otherwise have been appropriate.
What is your application, where you need (++) frequently? Today I like
that (++) points me to the fact, that we are working on lists. Ok, I would
be fine, if (++) would be a method for all sequence types. But for
MonadPlus, this is too general for my taste.
> I am a little puzzled that there seems to be no connection between
> MonadPlus and Monoid. Monoid requires a unit and an associative
> binary operator. So does MonadPlus. Unfortunately, they have different
> names. If only we'd had (Monoid m, Monad m) => MonadPlus m...
Monoid is of kind *
MonadPlus is of kind * -> *
More information about the Haskell-Cafe