[project @ 2004-10-01 13:42:04 by simonpj]
authorsimonpj <unknown>
Fri, 1 Oct 2004 13:42:57 +0000 (13:42 +0000)
committersimonpj <unknown>
Fri, 1 Oct 2004 13:42:57 +0000 (13:42 +0000)
commit837824d2ff329a0f68c1434ae6812bea3ac7ec5f
treea8c1b734366c2d59c5b288cc3748a5f9cf6147dd
parentfadd15c6abed2f915ef61fd8df9ea5056f392f69
[project @ 2004-10-01 13:42:04 by simonpj]
------------------------------------
Simplify the treatment of newtypes
Complete hi-boot file consistency checking
------------------------------------

In the representation of types, newtypes used to have a special constructor
all to themselves, very like TyConApp, called NewTcApp.    The trouble is
that means we have to *know* when a newtype is a newtype, and in an hi-boot
context we may not -- the data type might be declared as
data T
in the hi-boot file, but as
newtype T = ...
in the source file.  In GHCi, which accumulates stuff from multiple compiles,
this makes a difference.

So I've nuked NewTcApp.  Newtypes are represented using TyConApps again. This
turned out to reduce the total amount of code, and simplify the Type data type,
which is all to the good.

This commit also fixes a few things in the hi-boot consistency checking
stuff.
27 files changed:
ghc/compiler/codeGen/ClosureInfo.lhs
ghc/compiler/coreSyn/MkExternalCore.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/deSugar/DsForeign.lhs
ghc/compiler/deSugar/DsMeta.hs
ghc/compiler/deSugar/Match.hi-boot-5
ghc/compiler/deSugar/Match.hi-boot-6
ghc/compiler/iface/IfaceType.lhs
ghc/compiler/iface/LoadIface.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/parser/RdrHsSyn.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/typecheck/TcMType.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcSplice.hi-boot-6
ghc/compiler/typecheck/TcSplice.lhs
ghc/compiler/typecheck/TcTyClsDecls.lhs
ghc/compiler/typecheck/TcTyDecls.lhs
ghc/compiler/typecheck/TcType.lhs
ghc/compiler/typecheck/TcUnify.lhs
ghc/compiler/types/InstEnv.lhs
ghc/compiler/types/TyCon.lhs
ghc/compiler/types/Type.lhs
ghc/compiler/types/TypeRep.lhs
ghc/compiler/types/Unify.lhs
ghc/compiler/utils/Util.lhs