Strict Haskell debate

Ashley Yakeley ashley at
Fri Feb 17 18:30:26 EST 2006

Andy Gill wrote:
> I'd like to see a way of enforcing return strictness, that is where you
> have confidence that what a function is returning is fully evaluated.
> Imagine a function hstrict;
>      hstrict :: a -> a

Is this like deepseq, that strictly evaluates internal structure using seq?

> With hstrict you can write functions in the style.
> fun f a b c = hstrict $ ....
>   where
>     ...
>     ...

But surely fun can return the unevaluated thunk (hstrict x)? Since 
hstrict has not yet been called, it can't do its strictifying magic, 
whatever that is.

Ashley Yakeley

More information about the Haskell-prime mailing list