Strictness in data declaration not matched in assembler?

Jules Bean jules at
Wed Oct 15 10:48:26 EDT 2008

Tyson Whitehead wrote:
> It seems to me that the !Int member of the Data constructor is being treated 
> like it might be a thunk in sni_info (i.e., the whole "testq $7,%rbx" thing).
> Isn't this unnecessary as the "!" strictness flag means the Int argument must 
> be forced by the Data constructor before being captured?

Strictness does not imply unboxing.

To see why not, think about the fact that unboxing breaks sharing. By 
keeping the pointer-indirection in place, we can share even strict 
fields between related values.

Try -funbox-strict-fields or the UNBOX pragma.


More information about the Glasgow-haskell-users mailing list