This solution was used in the first place. But then some people were too lazy
to actually use the Eval (as Seq was called) class, so they wanted
a polymorphic seq.  And so we're in this mess.  And it is a mess,
e.g., the foldr/build transformation ghc uses to fuse list processing
isn't really valid when you have seq.

        -- Lennart

On Jan 19, 2007, at 18:09 , Brian Hulley wrote:

Neil Mitchell wrote:
Hi Brian,
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 based on the types, and it doesn't go
wrong. You would probably want deriving Seq support.

This seems an amazingly neat solution to a really terrible problem, so:

1) Does anyone know why this was not used in the first place?

2) Would it be good to use this in future versions of Haskell?

3) Is there any practical program which requires the current seq that could not be rewritten to use the typeclass seq?

Thanks, Brian.
--
http://www.metamilk.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to