Fix Trac #959: a long-standing bug in instantiating otherwise-unbound type variables
authorsimonpj@microsoft.com <unknown>
Thu, 15 Oct 2009 12:28:10 +0000 (12:28 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 15 Oct 2009 12:28:10 +0000 (12:28 +0000)
commit388e3356f71daffa62f1d4157e1e07e4c68f218a
treec65be526dc1aec02a3c2b872f7350091433032e0
parentc173e8d155ca61ec53224c39d8cb936ddcc5dbda
Fix Trac #959: a long-standing bug in instantiating otherwise-unbound type variables

   DO NOT MERGE TO GHC 6.12 branch
   (Reason: interface file format change.)

The typechecker needs to instantiate otherwise-unconstraint type variables to
an appropriately-kinded constant type, but we didn't have a supply of
arbitrarily-kinded tycons for this purpose.  Now we do.

The details are described in Note [Any types] in TysPrim.  The
fundamental change is that there is a new sort of TyCon, namely
AnyTyCon, defined in TyCon.

Ter's a small change to interface-file binary format, because the new
AnyTyCons have to be serialised.

I tided up the handling of uniques a bit too, so that mkUnique is not
exported, so that we can see all the different name spaces in one module.
18 files changed:
compiler/basicTypes/OccName.lhs
compiler/basicTypes/Unique.lhs
compiler/deSugar/DsBinds.lhs
compiler/iface/BinIface.hs
compiler/iface/IfaceType.lhs
compiler/iface/TcIface.lhs
compiler/nativeGen/Reg.hs
compiler/nativeGen/RegAlloc/Graph/ArchBase.hs
compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
compiler/nativeGen/RegClass.hs
compiler/prelude/PrelNames.lhs
compiler/prelude/TysPrim.lhs
compiler/prelude/TysWiredIn.lhs
compiler/stgSyn/CoreToStg.lhs
compiler/typecheck/TcHsSyn.lhs
compiler/types/TyCon.lhs
compiler/types/TypeRep.lhs
compiler/vectorise/VectUtils.hs