Strictness in data declaration not matched in assembler?
Jules Bean
jules at jellybean.co.uk
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.
Jules
More information about the Glasgow-haskell-users
mailing list