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

git at git.haskell.org git at git.haskell.org
Thu Aug 27 16:47:22 UTC 2015


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

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

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

commit df730ca7185b6e140965d99aa29c89687a279bf3
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


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

df730ca7185b6e140965d99aa29c89687a279bf3
 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