deeqSeq proposal
Rene de Visser
rene_de_visser at hotmail.com
Fri Apr 7 06:59:21 EDT 2006
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.
More information about the Haskell-prime
mailing list