Hello,

As deepSeq has a non local effect, I think it requires a non-local source transformation to implement it. One option would be for the compiler to create a second deepSeq version of every function definition.

e.g.

If the user defines a function f

f x = g h x

then the compile creates an additional function !!f

!!f x = temp `seq` temp
         where temp = !!g !!h x

which uses the compiler generated functions !!g and !!h.

It looks like library writers are increasingly doing this manually. Creating a strict and non strict version of a number of the functions provided. This would automate that.

Rene.


_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to