
19 Oct
2007
19 Oct
'07
4:30 a.m.
Twan van Laarhoven wrote:
apfelmus wrote:
class Cartesian cat where fst :: cat (a,b) a snd :: cat (a,b) b (&&&) :: cat c a -> cat c b -> cat c (a,b)
with the conditions
fst . (f &&& g) = f snd . (f &&& g) = g
That is not correct, fst . (f &&& g) also has the side effects of g.
Well, your remark indeed shows that it'ss not correct in the sense that Arrows aren't cartesian categories, that's why I mumbled something about Freyd-categories. Scary details here http://cs.ioc.ee/~tarmo/monads-more/monads-more-3.pdf but it can be stated a bit simpler, I guess. Regards, apfelmus