diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Builtin/Types.hs | 12 | ||||
-rw-r--r-- | compiler/GHC/Builtin/Utils.hs | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/compiler/GHC/Builtin/Types.hs b/compiler/GHC/Builtin/Types.hs index 421029a4fb..1c587810ba 100644 --- a/compiler/GHC/Builtin/Types.hs +++ b/compiler/GHC/Builtin/Types.hs @@ -74,6 +74,7 @@ module GHC.Builtin.Types ( tupleTyCon, tupleDataCon, tupleTyConName, tupleDataConName, promotedTupleDataCon, unitTyCon, unitDataCon, unitDataConId, unitTy, unitTyConKey, + soloTyCon, pairTyCon, mkPromotedPairTy, isPromotedPairType, unboxedUnitTy, unboxedUnitTyCon, unboxedUnitDataCon, @@ -288,6 +289,14 @@ wiredInTyCons = [ -- Units are not treated like other tuples, because they -- need to look out for them. unitTyCon , unboxedUnitTyCon + + -- Solo (i.e., the bosed 1-tuple) is also not treated + -- like other tuples (i.e. we /do/ include it here), + -- since it does not use special syntax like other tuples + -- See Note [One-tuples] (Wrinkle: Make boxed one-tuple names + -- have known keys) in GHC.Builtin.Types. + , soloTyCon + , anyTyCon , boolTyCon , charTyCon @@ -1208,6 +1217,9 @@ unitDataCon = head (tyConDataCons unitTyCon) unitDataConId :: Id unitDataConId = dataConWorkId unitDataCon +soloTyCon :: TyCon +soloTyCon = tupleTyCon Boxed 1 + pairTyCon :: TyCon pairTyCon = tupleTyCon Boxed 2 diff --git a/compiler/GHC/Builtin/Utils.hs b/compiler/GHC/Builtin/Utils.hs index 16d5096605..9d91b1246d 100644 --- a/compiler/GHC/Builtin/Utils.hs +++ b/compiler/GHC/Builtin/Utils.hs @@ -62,7 +62,6 @@ import GHC.Core.Class import GHC.Core.TyCon import GHC.Types.Avail -import GHC.Types.Basic import GHC.Types.Id import GHC.Types.Name import GHC.Types.Name.Env @@ -130,13 +129,6 @@ knownKeyNames = all_names where all_names = - -- We exclude most tuples from this list—see - -- Note [Infinite families of known-key names] in GHC.Builtin.Names. - -- We make an exception for Solo (i.e., the boxed 1-tuple), since it does - -- not use special syntax like other tuples. - -- See Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys) - -- in GHC.Builtin.Types. - tupleTyConName BoxedTuple 1 : tupleDataConName Boxed 1 : concat [ concatMap wired_tycon_kk_names primTyCons , concatMap wired_tycon_kk_names wiredInTyCons , concatMap wired_tycon_kk_names typeNatTyCons |