[project @ 2001-05-18 08:46:18 by simonpj]
authorsimonpj <unknown>
Fri, 18 May 2001 08:46:22 +0000 (08:46 +0000)
committersimonpj <unknown>
Fri, 18 May 2001 08:46:22 +0000 (08:46 +0000)
commitb4775e5e760111e2d71fba3c44882dce390edfb2
tree6f6ef296410654a2e22101a80e23156b9f5980f6
parent740b4461248bc55706b49214edbec026ab2bc38f
[project @ 2001-05-18 08:46:18 by simonpj]
-----------------------------
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
32 files changed:
ghc/compiler/absCSyn/AbsCUtils.lhs
ghc/compiler/basicTypes/DataCon.lhs
ghc/compiler/basicTypes/Demand.lhs
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/basicTypes/MkId.lhs
ghc/compiler/basicTypes/UniqSupply.lhs
ghc/compiler/basicTypes/Unique.lhs
ghc/compiler/coreSyn/Subst.lhs
ghc/compiler/deSugar/DsMonad.lhs
ghc/compiler/deSugar/DsUtils.lhs
ghc/compiler/deSugar/Match.lhs
ghc/compiler/hsSyn/HsDecls.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/main/MkIface.lhs
ghc/compiler/parser/ParseUtil.lhs
ghc/compiler/parser/Parser.y
ghc/compiler/prelude/TysWiredIn.lhs
ghc/compiler/rename/ParseIface.y
ghc/compiler/rename/RnBinds.lhs
ghc/compiler/rename/RnEnv.lhs
ghc/compiler/rename/RnHiFiles.lhs
ghc/compiler/rename/RnSource.lhs
ghc/compiler/simplCore/SetLevels.lhs
ghc/compiler/simplCore/SimplMonad.lhs
ghc/compiler/simplCore/Simplify.lhs
ghc/compiler/stranal/WwLib.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcClassDcl.lhs
ghc/compiler/typecheck/TcExpr.lhs
ghc/compiler/typecheck/TcMonad.lhs
ghc/compiler/typecheck/TcTyDecls.lhs
ghc/compiler/types/Generics.lhs