[Haskell] deriving DeepSeq and deep strict fields proposals (Re[2]: [Haskell-cafe] How can we detect and fix memory leak due to lazyness?)

Bulat Ziganshin bulat.ziganshin at gmail.com
Tue Aug 8 03:43:10 EDT 2006


Hello Ki,

Tuesday, August 8, 2006, 6:34:51 AM, you wrote:

> Unfortunately seq and the strict data declaration is not helpful in general.
> They are only helpful on base values such as Int or Bool.
> What they do is just making sure that it is not a thunk.
> That is if it was a list it would just evaluate to see the cons cell
> but no further.

> Someone wrote a deepSeq module for forcing deep evaluation, which is

it was a proposal to add deepSeq to the language itself (just allow to
automatically derive it by compiler, for example). we can add another
proposal of implementing deep strict fields:

data T = C !![Int]

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell mailing list