[Haskell-cafe] Re: what is inverse of mzero and return?
k.schupke at imperial.ac.uk
Tue Jan 25 05:06:03 EST 2005
Daniel Fischer wrote:
>I think, 1. should be acceptable to everybody, and 2. as a principle too, only
>the question of which effects are relevant needs to be answered. It's plain
>that not all measurable effects are relevant. My inclination to ignore the
>side-effects stemmed from the (irrational) desire to have IO's MonadPlus
>instance justified, now I'm prepared to say yes, side-effects such as output
>do count, so the instance MonadPlus IO is erroneous, but may be maintained
>for practical reasons.
I am sure monads in Haskell (and other functional languages like ML) are
on types not values. Therefore it only matters that the types are
correct and that
the operator obeys the associative laws. I am reasonably sure the values
returned or side-effects are irrelevent.
More information about the Haskell-Cafe