Skip to content
  • Simon Peyton Jones's avatar
    [project @ 2001-05-18 08:46:18 by simonpj] · b4775e5e
    Simon Peyton Jones authored
    -----------------------------
    	Get unbox-strict-fields right
    	-----------------------------
    
    The problem was that when a library was compiled *without* -funbox-strict-fields,
    and the main program was compiled *with* that flag, we were wrongly treating
    the fields of imported data types as unboxed.
    
    To fix this I added an extra constructor to StrictnessMark to express whether
    the "!" annotation came from an interface file (don't fiddle) or a source
    file (decide whether to unbox).
    
    On the way I tided things up:
    
    * StrictnessMark moves to Demand.lhs, and doesn't have the extra DataCon
      fields that kept it in DataCon before.
    
    * HsDecls.BangType has one constructor, not three, with a StrictnessMark field.
    
    * DataCon keeps track of its strictness signature (dcRepStrictness), but not
      its "user strict marks" (which were never used)
    
    * All the functions, like getUniquesDs, that used to take an Int saying how
      many uniques to allocate, now return an infinite list. This saves arguments
      and hassle.  But it involved touching quite a few files.
    
    * rebuildConArgs takes a list of Uniques to use as its unique supply.  This
      means I could combine DsUtils.rebuildConArgs with MkId.rebuildConArgs
      (hooray; the main point of the previous change)
    
    
    I also tidied up one or two error messages
    b4775e5e