Commit 00665a19 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Remove dead code concerning coercions from TypeRep

parent f06f40fb
...@@ -818,8 +818,6 @@ unliftedTypeKindTyConKey = mkPreludeTyConUnique 89 ...@@ -818,8 +818,6 @@ unliftedTypeKindTyConKey = mkPreludeTyConUnique 89
ubxTupleKindTyConKey = mkPreludeTyConUnique 90 ubxTupleKindTyConKey = mkPreludeTyConUnique 90
argTypeKindTyConKey = mkPreludeTyConUnique 91 argTypeKindTyConKey = mkPreludeTyConUnique 91
eqCoercionKindTyConKey = mkPreludeTyConUnique 92
-- Coercion constructors -- Coercion constructors
symCoercionTyConKey = mkPreludeTyConUnique 93 symCoercionTyConKey = mkPreludeTyConUnique 93
transCoercionTyConKey = mkPreludeTyConUnique 94 transCoercionTyConKey = mkPreludeTyConUnique 94
......
...@@ -37,15 +37,12 @@ module TypeRep ( ...@@ -37,15 +37,12 @@ module TypeRep (
isTySuperKind, isCoSuperKind, isTySuperKind, isCoSuperKind,
tySuperKindTyCon, coSuperKindTyCon, tySuperKindTyCon, coSuperKindTyCon,
isCoercionKindTyCon,
pprKind, pprParendKind pprKind, pprParendKind
) where ) where
#include "HsVersions.h" #include "HsVersions.h"
import {-# SOURCE #-} DataCon( DataCon, dataConName ) import {-# SOURCE #-} DataCon( DataCon, dataConName )
import Monad ( guard )
-- friends: -- friends:
import Var ( Var, Id, TyVar, tyVarKind ) import Var ( Var, Id, TyVar, tyVarKind )
...@@ -53,7 +50,9 @@ import VarSet ( TyVarSet ) ...@@ -53,7 +50,9 @@ import VarSet ( TyVarSet )
import Name ( Name, NamedThing(..), BuiltInSyntax(..), mkWiredInName ) import Name ( Name, NamedThing(..), BuiltInSyntax(..), mkWiredInName )
import OccName ( mkOccNameFS, tcName, parenSymOcc ) import OccName ( mkOccNameFS, tcName, parenSymOcc )
import BasicTypes ( IPName, tupleParens ) import BasicTypes ( IPName, tupleParens )
import TyCon ( TyCon, mkFunTyCon, tyConArity, tupleTyConBoxity, isTupleTyCon, isRecursiveTyCon, isNewTyCon, mkVoidPrimTyCon, mkSuperKindTyCon, isSuperKindTyCon, mkCoercionTyCon ) import TyCon ( TyCon, mkFunTyCon, tyConArity, tupleTyConBoxity, isTupleTyCon,
isRecursiveTyCon, isNewTyCon, mkVoidPrimTyCon,
mkSuperKindTyCon )
import Class ( Class ) import Class ( Class )
-- others -- others
...@@ -61,7 +60,7 @@ import PrelNames ( gHC_PRIM, funTyConKey, tySuperKindTyConKey, ...@@ -61,7 +60,7 @@ import PrelNames ( gHC_PRIM, funTyConKey, tySuperKindTyConKey,
coSuperKindTyConKey, liftedTypeKindTyConKey, coSuperKindTyConKey, liftedTypeKindTyConKey,
openTypeKindTyConKey, unliftedTypeKindTyConKey, openTypeKindTyConKey, unliftedTypeKindTyConKey,
ubxTupleKindTyConKey, argTypeKindTyConKey, listTyConKey, ubxTupleKindTyConKey, argTypeKindTyConKey, listTyConKey,
parrTyConKey, hasKey, eqCoercionKindTyConKey ) parrTyConKey, hasKey )
import Outputable import Outputable
\end{code} \end{code}
...@@ -211,10 +210,6 @@ type Kind = Type -- Invariant: a kind is always ...@@ -211,10 +210,6 @@ type Kind = Type -- Invariant: a kind is always
type SuperKind = Type -- Invariant: a super kind is always type SuperKind = Type -- Invariant: a super kind is always
-- TyConApp SuperKindTyCon ... -- TyConApp SuperKindTyCon ...
type Coercion = Type
type CoercionKind = Kind
data TyNote = FTVNote TyVarSet -- The free type variables of the noted expression data TyNote = FTVNote TyVarSet -- The free type variables of the noted expression
\end{code} \end{code}
...@@ -341,8 +336,6 @@ openTypeKindTyCon = mkKindTyCon openTypeKindTyConName ...@@ -341,8 +336,6 @@ openTypeKindTyCon = mkKindTyCon openTypeKindTyConName
unliftedTypeKindTyCon = mkKindTyCon unliftedTypeKindTyConName unliftedTypeKindTyCon = mkKindTyCon unliftedTypeKindTyConName
ubxTupleKindTyCon = mkKindTyCon ubxTupleKindTyConName ubxTupleKindTyCon = mkKindTyCon ubxTupleKindTyConName
argTypeKindTyCon = mkKindTyCon argTypeKindTyConName argTypeKindTyCon = mkKindTyCon argTypeKindTyConName
eqCoercionKindTyCon =
mkCoercionTyCon eqCoercionKindTyConName 2 (\ _ -> coSuperKind)
mkKindTyCon :: Name -> TyCon mkKindTyCon :: Name -> TyCon
mkKindTyCon name = mkVoidPrimTyCon name tySuperKind 0 mkKindTyCon name = mkVoidPrimTyCon name tySuperKind 0
...@@ -359,10 +352,6 @@ ubxTupleKindTyConName = mkPrimTyConName FSLIT("(##)") ubxTupleKindTyConKey u ...@@ -359,10 +352,6 @@ ubxTupleKindTyConName = mkPrimTyConName FSLIT("(##)") ubxTupleKindTyConKey u
argTypeKindTyConName = mkPrimTyConName FSLIT("??") argTypeKindTyConKey argTypeKindTyCon argTypeKindTyConName = mkPrimTyConName FSLIT("??") argTypeKindTyConKey argTypeKindTyCon
funTyConName = mkPrimTyConName FSLIT("(->)") funTyConKey funTyCon funTyConName = mkPrimTyConName FSLIT("(->)") funTyConKey funTyCon
eqCoercionKindTyConName = mkWiredInName gHC_PRIM (mkOccNameFS tcName (FSLIT(":=:")))
eqCoercionKindTyConKey Nothing (ATyCon eqCoercionKindTyCon)
BuiltInSyntax
mkPrimTyConName occ key tycon = mkWiredInName gHC_PRIM (mkOccNameFS tcName occ) mkPrimTyConName occ key tycon = mkWiredInName gHC_PRIM (mkOccNameFS tcName occ)
key key
Nothing -- No parent object Nothing -- No parent object
...@@ -402,9 +391,6 @@ isCoSuperKind (NoteTy _ ty) = isCoSuperKind ty ...@@ -402,9 +391,6 @@ isCoSuperKind (NoteTy _ ty) = isCoSuperKind ty
isCoSuperKind (TyConApp kc []) = kc `hasKey` coSuperKindTyConKey isCoSuperKind (TyConApp kc []) = kc `hasKey` coSuperKindTyConKey
isCoSuperKind other = False isCoSuperKind other = False
isCoercionKindTyCon kc = kc `hasKey` eqCoercionKindTyConKey
------------------- -------------------
-- lastly we need a few functions on Kinds -- lastly we need a few functions on Kinds
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment