patch applied (ghc): Improve unboxing of strict fields
Simon Peyton Jones
simonpj at microsoft.com
Wed Oct 4 11:33:33 EDT 2006
Wed Oct 4 08:27:05 PDT 2006 simonpj at microsoft.com
* Improve unboxing of strict fields
Note [Recursive unboxing]
Be careful not to try to unbox this!
data T = MkT !T Int
But it's the *argument* type that matters. This is fine:
data S = MkS S !Int
because Int is non-recursive.
Before this patch, we were only doing the unboxing if the *parent*
data type was non-recursive (eg that meant S was not unboxed), but
that is over-conservative.
This showed up with indexed data types (thanks to Roman for finding it)
because indexed data types are conservatively regarded as always recursive.
M ./compiler/typecheck/TcTyClsDecls.lhs -7 +15
More information about the Cvs-ghc