[commit: ghc] wip/T9858-typeable-ben2: Include constraint tuples in the known-key names (cbc2c41)

git at git.haskell.org git at git.haskell.org
Sun Sep 13 04:19:53 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T9858-typeable-ben2
Link       : http://ghc.haskell.org/trac/ghc/changeset/cbc2c41c1cd3b3f1e0ab417051febb15effa23fe/ghc

>---------------------------------------------------------------

commit cbc2c41c1cd3b3f1e0ab417051febb15effa23fe
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Aug 27 17:48:38 2015 +0100

    Include constraint tuples in the known-key names


>---------------------------------------------------------------

cbc2c41c1cd3b3f1e0ab417051febb15effa23fe
 compiler/prelude/PrelInfo.hs | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/compiler/prelude/PrelInfo.hs b/compiler/prelude/PrelInfo.hs
index 9cfa78b..16f72e1 100644
--- a/compiler/prelude/PrelInfo.hs
+++ b/compiler/prelude/PrelInfo.hs
@@ -72,15 +72,26 @@ Notes about wired in things
 
 
 knownKeyNames :: [Name]
--- This list is used to ensure that when you say "Prelude.map" in your
--- source code, you get a Name with the correct known key
+-- This list is used to ensure that when you say "Prelude.map"
+--  in your source code, or in an interface file,
+-- you get a Name with the correct known key
 -- (See Note [Known-key names] in PrelNames)
 knownKeyNames
   = concat [ tycon_kk_names funTyCon
            , concatMap tycon_kk_names primTyCons
+
            , concatMap tycon_kk_names wiredInTyCons
+             -- Does not include tuples
+
            , concatMap tycon_kk_names typeNatTyCons
+
            , concatMap (rep_names . tupleTyCon Boxed) [2..mAX_TUPLE_SIZE]  -- Yuk
+
+           , cTupleTyConNames
+             -- Constraint tuples are known-key but not wired-in
+             -- They can't show up in source code, but can appear
+             -- in intreface files
+
            , map idName wiredInIds
            , map (idName . primOpId) allThePrimOps
            , basicKnownKeyNames ]



More information about the ghc-commits mailing list