patch applied (ghc): Fix a space leak in the native code gen (again)

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Sep 14 18:58:32 EDT 2009


On Mon, 2009-09-14 at 14:24 +0100, Simon Marlow wrote:

> The workaround is to use this idiom instead:
> 
>     do
>       p <- return $! ...
>       return (p, q)

Isn't the better idiom to use evaluate?

let p = ...
evaluate p
return (p, q)

When p is the only result it collapses to just

let p = ...
evaluate p


Duncan



More information about the Cvs-ghc mailing list