[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:56:06
Message-ID: 41F633D6.6020500 () imperial ! ac ! uk
[Download RAW message or body]

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?

    Keean.

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

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