[commit: ghc] wip/ttypeable: Fix primitive types (e19c41e)
git at git.haskell.org
git at git.haskell.org
Wed Apr 13 17:55:38 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ttypeable
Link : http://ghc.haskell.org/trac/ghc/changeset/e19c41e95b087992debda468cf79e23854a9808e/ghc
>---------------------------------------------------------------
commit e19c41e95b087992debda468cf79e23854a9808e
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Mar 16 19:52:17 2016 +0100
Fix primitive types
>---------------------------------------------------------------
e19c41e95b087992debda468cf79e23854a9808e
compiler/prelude/TysPrim.hs | 2 +-
compiler/typecheck/TcInteract.hs | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/compiler/prelude/TysPrim.hs b/compiler/prelude/TysPrim.hs
index 34f020c..81fc3f9 100644
--- a/compiler/prelude/TysPrim.hs
+++ b/compiler/prelude/TysPrim.hs
@@ -20,7 +20,7 @@ module TysPrim(
kKiVar,
-- Kind constructors...
- tYPETyConName, unliftedTypeKindTyConName,
+ tYPETyCon, tYPETyConName, unliftedTypeKindTyConName,
-- Kinds
tYPE,
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index e93f303..b1f138f 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -24,10 +24,10 @@ import Name
import PrelNames ( knownNatClassName, knownSymbolClassName,
typeableClassName, coercibleTyConKey,
heqTyConKey, ipClassKey,
- trTYPE'PtrRepLiftedName, trRuntimeRepName, trArrowName )
+ trTYPEName, trTYPE'PtrRepLiftedName, trRuntimeRepName, trArrowName )
import TysWiredIn ( typeNatKind, typeSymbolKind, heqDataCon,
coercibleDataCon, runtimeRepTy )
-import TysPrim ( eqPrimTyCon, eqReprPrimTyCon )
+import TysPrim ( eqPrimTyCon, eqReprPrimTyCon, tYPETyCon )
import Id( idType )
import CoAxiom ( Eqn, CoAxiom(..), CoAxBranch(..), fromBranches )
import Class
@@ -2000,7 +2000,9 @@ matchTypeable clas [k,t] -- clas = Typeable
| k `eqType` typeNatKind = doTyLit knownNatClassName t
| k `eqType` typeSymbolKind = doTyLit knownSymbolClassName t
| t `eqType` liftedTypeKind = doPrimRep trTYPE'PtrRepLiftedName t
+ | t `eqType` mkTyConTy tYPETyCon = doPrimRep trTYPEName t
| t `eqType` runtimeRepTy = doPrimRep trRuntimeRepName t
+ | t `eqType` mkTyConTy funTyCon = doPrimRep trArrowName t
| Just (tc, ks) <- splitTyConApp_maybe t -- See Note [Typeable (T a b c)]
, onlyNamedBndrsApplied tc ks = doTyConApp clas t tc
| Just (arg,ret) <- splitFunTy_maybe t = doFunTy clas t arg ret
More information about the ghc-commits
mailing list