[Haskell-cafe] Re: what is inverse of mzero and return?

Keean Schupke k.schupke at imperial.ac.uk
Tue Jan 25 06:56:06 EST 2005

Ashley Yakeley wrote:

>Every morphism in any category has a "from" object and a "to" object: it 
>is a morphism from object to object. In the "Haskell category", a 
>function of type 'A -> B' is a morphism from object (type) A to object B.
>But in category theory, just because two morphisms are both from object 
>A to object B does not mean that they are the same morphism. And so it 
>is for the Haskell category: two functions may both have type 'A -> B' 
>without being the same function.
I guess I am trying to understand how the Monad laws are derived from 
category theory...
I can only find referneces to associativity being required.

Monads are defined on functors, so the associativity just requires the 
associativity of the
'product' operation on functors...

I guess I don't quite see how associativity of functors (of the category 
of functions on types) implies identity on values... surely just the 
identity on those functors is required?


More information about the Haskell-Cafe mailing list