Fix Trac #959: a long-standing bug in instantiating otherwise-unbound type variables
[ghc-hetmet.git] / compiler / prelude / PrelNames.lhs
index 4c13965..bc08660 100644 (file)
@@ -111,7 +111,7 @@ basicKnownKeyNames
        stringTyConName,
        ratioDataConName,
        ratioTyConName,
-       integerTyConName, smallIntegerName, integerDataConName,
+       integerTyConName, smallIntegerName,
 
        --  Classes.  *Must* include:
        --      classes that are grabbed by key (e.g., eqClassKey)
@@ -235,7 +235,7 @@ pRELUDE :: Module
 pRELUDE                = mkBaseModule_ pRELUDE_NAME
 
 gHC_PRIM, gHC_TYPES, gHC_BOOL, gHC_UNIT, gHC_ORDERING, gHC_GENERICS, gHC_CLASSES, gHC_BASE, gHC_ENUM,
-    gHC_SHOW, gHC_READ, gHC_NUM, gHC_INTEGER, gHC_LIST, gHC_PARR,
+    gHC_SHOW, gHC_READ, gHC_NUM, gHC_INTEGER, gHC_INTEGER_TYPE, gHC_LIST, gHC_PARR,
     gHC_TUPLE, dATA_TUPLE, dATA_EITHER, dATA_STRING, dATA_FOLDABLE, dATA_TRAVERSABLE,
     gHC_PACK, gHC_CONC, gHC_IO, gHC_IO_Exception,
     gHC_ST, gHC_ARR, gHC_STABLE, gHC_ADDR, gHC_PTR, gHC_ERR, gHC_REAL,
@@ -255,6 +255,7 @@ gHC_SHOW    = mkBaseModule (fsLit "GHC.Show")
 gHC_READ       = mkBaseModule (fsLit "GHC.Read")
 gHC_NUM                = mkBaseModule (fsLit "GHC.Num")
 gHC_INTEGER    = mkIntegerModule (fsLit "GHC.Integer")
+gHC_INTEGER_TYPE       = mkIntegerModule (fsLit "GHC.Integer.Type")
 gHC_LIST       = mkBaseModule (fsLit "GHC.List")
 gHC_PARR       = mkBaseModule (fsLit "GHC.PArr")
 gHC_TUPLE      = mkPrimModule (fsLit "GHC.Tuple")
@@ -634,15 +635,14 @@ sndName             = varQual dATA_TUPLE (fsLit "snd") sndIdKey
 -- Module PrelNum
 numClassName, fromIntegerName, minusName, negateName, plusIntegerName,
     timesIntegerName,
-    integerTyConName, integerDataConName, smallIntegerName :: Name
+    integerTyConName, smallIntegerName :: Name
 numClassName     = clsQual  gHC_NUM (fsLit "Num") numClassKey
 fromIntegerName   = methName gHC_NUM (fsLit "fromInteger") fromIntegerClassOpKey
 minusName        = methName gHC_NUM (fsLit "-") minusClassOpKey
 negateName       = methName gHC_NUM (fsLit "negate") negateClassOpKey
 plusIntegerName   = varQual  gHC_INTEGER (fsLit "plusInteger") plusIntegerIdKey
 timesIntegerName  = varQual  gHC_INTEGER (fsLit "timesInteger") timesIntegerIdKey
-integerTyConName  = tcQual   gHC_INTEGER (fsLit "Integer") integerTyConKey
-integerDataConName  = conName gHC_INTEGER (fsLit "Integer") integerDataConKey
+integerTyConName  = tcQual   gHC_INTEGER_TYPE (fsLit "Integer") integerTyConKey
 smallIntegerName = varQual gHC_INTEGER (fsLit "smallInteger") smallIntegerIdKey
 
 -- PrelReal types and classes
@@ -742,9 +742,9 @@ ioTyConName, ioDataConName, thenIOName, bindIOName, returnIOName,
     failIOName :: Name
 ioTyConName      = tcQual  gHC_TYPES (fsLit "IO") ioTyConKey
 ioDataConName     = conName gHC_TYPES (fsLit "IO") ioDataConKey
-thenIOName       = varQual gHC_IO (fsLit "thenIO") thenIOIdKey
-bindIOName       = varQual gHC_IO (fsLit "bindIO") bindIOIdKey
-returnIOName     = varQual gHC_IO (fsLit "returnIO") returnIOIdKey
+thenIOName       = varQual gHC_BASE (fsLit "thenIO") thenIOIdKey
+bindIOName       = varQual gHC_BASE (fsLit "bindIO") bindIOIdKey
+returnIOName     = varQual gHC_BASE (fsLit "returnIO") returnIOIdKey
 failIOName       = varQual gHC_IO (fsLit "failIO") failIOIdKey
 
 -- IO things
@@ -923,7 +923,8 @@ addrPrimTyConKey, arrayPrimTyConKey, boolTyConKey, byteArrayPrimTyConKey,
     listTyConKey, foreignObjPrimTyConKey, weakPrimTyConKey,
     mutableArrayPrimTyConKey, mutableByteArrayPrimTyConKey,
     orderingTyConKey, mVarPrimTyConKey, ratioTyConKey, rationalTyConKey,
-    realWorldTyConKey, stablePtrPrimTyConKey, stablePtrTyConKey :: Unique
+    realWorldTyConKey, stablePtrPrimTyConKey, stablePtrTyConKey,
+    anyTyConKey :: Unique
 addrPrimTyConKey                       = mkPreludeTyConUnique  1
 arrayPrimTyConKey                      = mkPreludeTyConUnique  3
 boolTyConKey                           = mkPreludeTyConUnique  4
@@ -956,10 +957,7 @@ rationalTyConKey                   = mkPreludeTyConUnique 33
 realWorldTyConKey                      = mkPreludeTyConUnique 34
 stablePtrPrimTyConKey                  = mkPreludeTyConUnique 35
 stablePtrTyConKey                      = mkPreludeTyConUnique 36
-
-anyPrimTyConKey, anyPrimTyCon1Key :: Unique
-anyPrimTyConKey                                = mkPreludeTyConUnique 37
-anyPrimTyCon1Key                       = mkPreludeTyConUnique 38
+anyTyConKey                            = mkPreludeTyConUnique 37
 
 statePrimTyConKey, stableNamePrimTyConKey, stableNameTyConKey,
     mutVarPrimTyConKey, ioTyConKey,