Strictness in data declaration not matched in assembler?
simonpj at microsoft.com
Thu Oct 16 07:04:30 EDT 2008
| > BUT people who care probably UNPACK their strict fields too, which
| > is even better. The time you can't do that is for sum types
| > data T = MkT ![Int]
| You also can't do it for polymorphic components. I've used code like:
| data T a = MkT !a
| foo :: T (a,b) -> a
| foo (MkT (x,y)) = x
| Here, unpacking doesn't work but foo could still access the components
| of the pair directly.
Excellent point Roman.
More information about the Glasgow-haskell-users