On Tue, 4 Sep 2007, David Benbennick wrote:
On 9/4/07, ok [EMAIL PROTECTED] 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`
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
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
David Benbennick wrote:
You mean (++) = mplus. I've wondered that too. Similarly, one should
define map = fmap. And a lot of standard list functions can be
generalized to MonadPlus, for example you can define
filter :: (MonadPlus m) = (a - Bool) - m a - m a
Somehow this filter fails my
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
G'day all.
Slight nit...
Quoting ok [EMAIL PROTECTED]:
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
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 =
On 9/4/07, ok [EMAIL PROTECTED] 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