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 con
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 internalize
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
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 us
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
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
>
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,
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. Yo
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