[commit: ghc] wip/tc/typeable-with-kinds: Add wire-in names for the `Typeable` dictionary constructors. (6cb9e85)
git at git.haskell.org
git at git.haskell.org
Sat Mar 7 16:43:12 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/tc/typeable-with-kinds
Link : http://ghc.haskell.org/trac/ghc/changeset/6cb9e85e202ccf2ff1515512728c5506ae2d338d/ghc
>---------------------------------------------------------------
commit 6cb9e85e202ccf2ff1515512728c5506ae2d338d
Author: Iavor S. Diatchki <diatchki at galois.com>
Date: Tue Feb 10 10:37:23 2015 -0800
Add wire-in names for the `Typeable` dictionary constructors.
>---------------------------------------------------------------
6cb9e85e202ccf2ff1515512728c5506ae2d338d
compiler/prelude/PrelNames.hs | 37 +++++++++++++++++++++++++++++++++----
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/compiler/prelude/PrelNames.hs b/compiler/prelude/PrelNames.hs
index 69520eb..f23d77e 100644
--- a/compiler/prelude/PrelNames.hs
+++ b/compiler/prelude/PrelNames.hs
@@ -213,7 +213,14 @@ basicKnownKeyNames
alternativeClassName,
foldableClassName,
traversableClassName,
- typeableClassName, -- derivable
+
+ -- Typeable
+ typeableClassName,
+ mkTyConName,
+ mkPolyTyConAppName,
+ mkAppTyName,
+ typeLitTypeRepName,
+
-- Numeric stuff
negateName, minusName, geName, eqName,
@@ -1033,9 +1040,19 @@ rationalToDoubleName = varQual gHC_FLOAT (fsLit "rationalToDouble") rationalToDo
ixClassName :: Name
ixClassName = clsQual gHC_ARR (fsLit "Ix") ixClassKey
--- Class Typeable
-typeableClassName :: Name
-typeableClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable") typeableClassKey
+-- Class Typeable, and functions for constructing `Typeable` dictionaries
+typeableClassName
+ , mkTyConName
+ , mkPolyTyConAppName
+ , mkAppTyName
+ , typeLitTypeRepName
+ :: Name
+typeableClassName = clsQual tYPEABLE_INTERNAL (fsLit "Typeable") typeableClassKey
+mkTyConName = varQual tYPEABLE_INTERNAL (fsLit "mkTyCon") mkTyConKey
+mkPolyTyConAppName = varQual tYPEABLE_INTERNAL (fsLit "mkPolyTyConApp") mkPolyTyConAppKey
+mkAppTyName = varQual tYPEABLE_INTERNAL (fsLit "mkAppTy") mkAppTyKey
+typeLitTypeRepName = varQual tYPEABLE_INTERNAL (fsLit "typeLitTypeRep") typeLitTypeRepKey
+
-- Class Data
@@ -1873,6 +1890,18 @@ proxyHashKey = mkPreludeMiscIdUnique 502
-- USES IdUniques 200-499
-----------------------------------------------------
+-- Used to make `Typeable` dictionaries
+mkTyConKey
+ , mkPolyTyConAppKey
+ , mkAppTyKey
+ , typeLitTypeRepKey
+ :: Unique
+mkTyConKey = mkPreludeMiscIdUnique 503
+mkPolyTyConAppKey = mkPreludeMiscIdUnique 504
+mkAppTyKey = mkPreludeMiscIdUnique 505
+typeLitTypeRepKey = mkPreludeMiscIdUnique 506
+
+
{-
************************************************************************
* *
More information about the ghc-commits
mailing list