[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] Re: what is inverse of mzero and return?
From:       Keean Schupke <k.schupke () imperial ! ac ! uk>
Date:       2005-01-25 11:49:21
Message-ID: 41F63241.4040400 () imperial ! ac ! uk
[Download RAW message or body]

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.
>
> Specifically:
>
> 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
mzero?

    Keean.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic