Commit 3462534c authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Kill Type.isKindTy in favour of Kind.isKind (same code)

parent e17072d1
......@@ -23,6 +23,7 @@ module TcGenGenerics (canDoGenerics, canDoGenerics1,
import DynFlags
import HsSyn
import Type
import Kind ( isKind )
import TcType
import TcGenDeriv
import DataCon
......@@ -204,7 +205,7 @@ canDoGenerics tc tc_args
-- The type arguments should not be instantiated (see #5939)
-- Data family indices can be instantiated; the `tc_args` here are the
-- representation tycon args
(if (all isTyVarTy (filterOut isKindTy tc_args))
(if (all isTyVarTy (filterOut isKind tc_args))
then Nothing
else Just (tc_name <+> text "must not be instantiated;" <+>
text "try deriving `" <> tc_name <+> tc_tys <>
......
......@@ -63,7 +63,7 @@ module Type (
-- ** Predicates on types
isTypeVar, isKindVar,
isTyVarTy, isFunTy, isDictTy, isPredTy, isKindTy,
isTyVarTy, isFunTy, isDictTy, isPredTy,
-- (Lifting and boxity)
isUnLiftedType, isUnboxedTupleType, isAlgType, isClosedAlgType,
......@@ -852,9 +852,6 @@ isPredTy ty = go ty []
go_k (ForAllTy kv k1) (k2:args) = go_k (substKiWith [kv] [k2] k1) args
go_k _ _ = False -- Typeable * Int :: Constraint
isKindTy :: Type -> Bool
isKindTy = isSuperKind . typeKind
isClassPred, isEqPred, isIPPred :: PredType -> Bool
isClassPred ty = case tyConAppTyCon_maybe ty of
Just tyCon | isClassTyCon tyCon -> True
......
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