[commit: ghc] wip/ttypeable: Fix primitive types (b347d60)
git at git.haskell.org
git at git.haskell.org
Mon Jun 6 11:12:26 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ttypeable
Link : http://ghc.haskell.org/trac/ghc/changeset/b347d60cbff5a5cc24477e6f273900952e8fce0e/ghc
>---------------------------------------------------------------
commit b347d60cbff5a5cc24477e6f273900952e8fce0e
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Mar 16 19:52:17 2016 +0100
Fix primitive types
>---------------------------------------------------------------
b347d60cbff5a5cc24477e6f273900952e8fce0e
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 657ec08..5b7b7ab 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 37d6a13..bcb6ec7 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
@@ -2018,7 +2018,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