Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : no-pred-ty
http://hackage.haskell.org/trac/ghc/changeset/6bad38a40ce042bec554b0e4efe17c8c965416bc >--------------------------------------------------------------- commit 6bad38a40ce042bec554b0e4efe17c8c965416bc Author: Max Bolingbroke <[email protected]> Date: Sun Aug 14 08:06:17 2011 +0100 Remove bogus isCoercionKind function and its sole use >--------------------------------------------------------------- compiler/iface/TcIface.lhs | 5 +---- compiler/prelude/TysPrim.lhs | 2 +- compiler/types/Coercion.lhs | 2 +- compiler/types/Kind.lhs | 2 +- compiler/types/TypeRep.lhs | 9 +-------- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs index d0ce1b7..87fac02 100644 --- a/compiler/iface/TcIface.lhs +++ b/compiler/iface/TcIface.lhs @@ -1335,10 +1335,7 @@ bindIfaceTyVars bndrs thing_inside mk_iface_tyvar :: Name -> IfaceKind -> IfL TyVar mk_iface_tyvar name ifKind = do { kind <- tcIfaceType ifKind - ; if isCoercionKind kind then - return (Var.mkCoVar name kind) - else - return (Var.mkTyVar name kind) } + ; return (Var.mkTyVar name kind) } bindIfaceTyVars_AT :: [IfaceTvBndr] -> ([TyVar] -> IfL a) -> IfL a -- Used for type variable in nested associated data/type declarations diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs index d0495d7..b130c21 100644 --- a/compiler/prelude/TysPrim.lhs +++ b/compiler/prelude/TysPrim.lhs @@ -26,7 +26,7 @@ module TysPrim( -- Kinds liftedTypeKind, unliftedTypeKind, openTypeKind, argTypeKind, ubxTupleKind, - mkArrowKind, mkArrowKinds, isCoercionKind, + mkArrowKind, mkArrowKinds, funTyCon, funTyConName, primTyCons, diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs index 621168f..d9f48a3 100644 --- a/compiler/types/Coercion.lhs +++ b/compiler/types/Coercion.lhs @@ -18,7 +18,7 @@ module Coercion ( -- ** Predicates on Kinds isLiftedTypeKind, isUnliftedTypeKind, isOpenTypeKind, isUbxTupleKind, isArgTypeKind, isKind, isTySuperKind, - isSuperKind, isCoercionKind, + isSuperKind, mkArrowKind, mkArrowKinds, isSubArgTypeKind, isSubOpenTypeKind, isSubKind, defaultKind, eqKind, diff --git a/compiler/types/Kind.lhs b/compiler/types/Kind.lhs index 0594f7f..777ed43 100644 --- a/compiler/types/Kind.lhs +++ b/compiler/types/Kind.lhs @@ -28,7 +28,7 @@ module Kind ( -- ** Predicates on Kinds isLiftedTypeKind, isUnliftedTypeKind, isOpenTypeKind, isUbxTupleKind, isArgTypeKind, isKind, isTySuperKind, - isSuperKind, isCoercionKind, + isSuperKind, isLiftedTypeKindCon, isSubArgTypeKind, isSubOpenTypeKind, isSubKind, defaultKind, diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs index d656620..6a0b87c 100644 --- a/compiler/types/TypeRep.lhs +++ b/compiler/types/TypeRep.lhs @@ -18,7 +18,7 @@ module TypeRep ( -- Functions over types mkTyConApp, mkTyConTy, mkTyVarTy, mkTyVarTys, - isLiftedTypeKind, isCoercionKind, + isLiftedTypeKind, -- Pretty-printing pprType, pprParendType, pprTypeApp, @@ -266,13 +266,6 @@ isLiftedTypeKind :: Kind -> Bool -- This function is here because it's used in the pretty printer isLiftedTypeKind (TyConApp tc []) = tc `hasKey` liftedTypeKindTyConKey isLiftedTypeKind _ = False - -isCoercionKind :: Kind -> Bool --- All coercions are of form (ty1 ~ ty2) --- This function is here rather than in Coercion, because it --- is used in a knot-tied way to enforce invariants in Var -isCoercionKind (PredTy (EqPred {})) = True -isCoercionKind _ = False \end{code} _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
