Re: Which of the following PrimTyCons have a pointer-sized representations
Simon Marlow <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
On 11/12/12 21:31, Johan Tibell wrote: > On Tue, Dec 11, 2012 at 1:02 PM, Simon Peyton-Jones > <[email protected]> wrote: >> | > data T = MkT !S >> | > data S = MkS Int >> | > >> | > then my impl will unbox the S field of MkT because the result is only one field >> | wide, namely an Int. >> | >> | Wouldn't Johan's have unboxed S too? (if not, I misunderstood what he did) >> >> No, that would change the semantics! We don't want to do that. > > I think Simon M meant that my change would have unpacked the field of > *type* S in the MkT constructor. We must not unpack the field in the > MkS constructor. Correct, sorry for not being clear enough. >> | I'm happy to call this -funbox-strict-small-fields. However, I'd like >> | the documentation to talk about pointer-sized things as that, even >> | though a bit operational sounding, has a clear meaning in my mind. >> >> I'm somewhat inclined to *change* the current flag so that >> >> -funbox-strict-fields means "unbox small fields" >> -funbox-all-strict-fields means "unbox ALL strict fields" > > Lets go with -funbox-small-strict-fields to avoid unnecessary > breakages. If we end up enabling this flag by default eventually it > doesn't really matter what the name is as people will never type it > out explicitly. +1 There are lots of users of the existing flag, we don't want to change its meaning. Cheers, Simon