diff options
Diffstat (limited to 'compiler/GHC/Builtin/Utils.hs')
-rw-r--r-- | compiler/GHC/Builtin/Utils.hs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/GHC/Builtin/Utils.hs b/compiler/GHC/Builtin/Utils.hs index dc03f051bb..ab2aeed961 100644 --- a/compiler/GHC/Builtin/Utils.hs +++ b/compiler/GHC/Builtin/Utils.hs @@ -59,6 +59,7 @@ import GHC.Core.Opt.ConstantFold import GHC.Types.Avail import GHC.Builtin.PrimOps import GHC.Core.DataCon +import GHC.Types.Basic import GHC.Types.Id import GHC.Types.Name import GHC.Types.Name.Env @@ -124,14 +125,17 @@ 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 Unit (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 [ wired_tycon_kk_names funTyCon , concatMap wired_tycon_kk_names primTyCons - , concatMap wired_tycon_kk_names wiredInTyCons - -- Does not include tuples - , concatMap wired_tycon_kk_names typeNatTyCons - , map idName wiredInIds , map (idName . primOpId) allThePrimOps , map (idName . primOpWrapperId) allThePrimOps |