[Haskell-cafe] Re: what is inverse of mzero and return?
k.schupke at imperial.ac.uk
Tue Jan 25 06:49:21 EST 2005
Jules Bean wrote:
> No. Well: they are functions 'on' types, but functions 'on' types map
> values to values.
> Analogy: In the category of sets and functions, the objects are sets
> and the morphisms are functions. The functions --- from sets to sets
> --- take objects in one set to objects in another set.
> A monad T is a (endo)functor T : * -> * where * is the category of
> types, together with a multiplication mu and a unit eta.
So, * is the category of Types, and functions on type (which map values
to values), and T is
an endofunctor (mapping functions on type to functions on type).
How does this affect the IO monad though?
m >>= (\a -> mzero) === mzero
If we consider the state monad, surely the above makes no comment on what
the final state should be, only the final value returned...
Or is MonadPlus not definable on State monads?
If it is then considering IO === ST RealWorld, would imply that the actions
of the IO monad are not important as long as the final value returned is
More information about the Haskell-Cafe