[Haskell-cafe] Re: Article review: Category Theory

2007-01-19 Thread apfelmus
Ulf Norell wrote: In the section on the category laws you say that the identity morphism should satisfy f . idA = idB . f This is not strong enough. You need f . idA = f = idB . f Unfortunately, fixing this means that the category Hask is no longer a category since _|_ . id

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-19 Thread Lennart Augustsson
And this is why some of us think that adding polymorphic seq to Haskell was a mistake. :( -- Lennart On Jan 19, 2007, at 08:05 , [EMAIL PROTECTED] wrote: Ulf Norell wrote: In the section on the category laws you say that the identity morphism should satisfy f . idA = idB . f

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-19 Thread Brian Hulley
Lennart Augustsson wrote: On Jan 19, 2007, at 08:05 , [EMAIL PROTECTED] wrote: Thus, Hask is not a category, at least not as defined in the article. The problem is that (either) morphisms or the morphism composition ('.') are not internalized correctly in Haskell. And this is why some of

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-19 Thread Neil Mitchell
Hi Brian, I've often wondered why seq is the primitive and not $! Would this solve the problem? Is there any solution that would allow excess laziness to be removed from a Haskell program such that Hask would be a category? class Seq a where seq :: a - b - b Then you have a different seq

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-19 Thread Jan-Willem Maessen
On Jan 19, 2007, at 1:07 PM, Brian Hulley wrote: Lennart Augustsson wrote: On Jan 19, 2007, at 08:05 , [EMAIL PROTECTED] wrote: Thus, Hask is not a category, at least not as defined in the article. The problem is that (either) morphisms or the morphism composition ('.') are not

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-19 Thread Lennart Augustsson
No, making $! the primitive would not help. You can define seq from $!. I think seq is a suitable primitive, it's just that it ruins nice properties. The original formulation of seq in Haskell was the right one in my opinion: class Eval where seq :: a - b - b This way you get a

[Haskell-cafe] Re: Article review: Category Theory

2007-01-18 Thread Johan Grönqvist
Ulf Norell skrev: On Jan 16, 2007, at 7:22 PM, David House wrote: In the section on the category laws you say that the identity morphism should satisfy f . idA = idB . f This is not strong enough. You need f . idA = f = idB . f (I do not know category theory, but try to learn from

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-18 Thread David House
On 18/01/07, Johan Gršnqvist [EMAIL PROTECTED] wrote: f = idA . f = (h . g) . f = h . (g . f) = h . idB = h Thus in the figure f=h must hold, nad one arrow can be removed from the graph. The point from here was to conclude that this graph can't represent a category, not that f = h. You

Re: [Haskell-cafe] Re: Article review: Category Theory

2007-01-18 Thread Brian Hulley
Johan Gršnqvist wrote: Ulf Norell skrev: On Jan 16, 2007, at 7:22 PM, David House wrote: In the section on the category laws you say that the identity morphism should satisfy f . idA = idB . f This is not strong enough. You need f . idA = f = idB . f (I do not know category theory,