GHC.Core.Predicate
Documentation
A predicate in the solver. The solver tries to prove Wanted predicates from Given ones.
classifyPredType :: PredType -> Pred Source #
isEvVarType :: Type -> Bool Source #
A choice of equality relation. This is separate from the type Role
because Phantom
does not define a (non-trivial) equality relation.
isEqPrimPred :: PredType -> Bool Source #
getEqPredRole :: PredType -> Role Source #
predTypeEqRel :: PredType -> EqRel Source #
Get the equality relation relevant for a pred type.
mkPrimEqPred :: Type -> Type -> Type Source #
Creates a primitive type equality predicate. Invariant: the types are not Coercions
mkPrimEqPredRole :: Role -> Type -> Type -> PredType Source #
Makes a lifted equality predicate at the given role
mkHeteroPrimEqPred :: Kind -> Kind -> Type -> Type -> Type Source #
Creates a primitive type equality predicate with explicit kinds
mkHeteroReprPrimEqPred :: Kind -> Kind -> Type -> Type -> Type Source #
Creates a primitive representational type equality predicate with explicit kinds
isClassPred :: PredType -> Bool Source #
isEqPredClass :: Class -> Bool Source #
isCTupleClass :: Class -> Bool Source #
getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type]) Source #
classMethodTy :: Id -> Type Source #
isIPLikePred :: Type -> Bool Source #
isCallStackTy :: Type -> Bool Source #
Is a type a CallStack
?
isCallStackPred :: Class -> [Type] -> Maybe FastString Source #
Is a PredType
a CallStack
implicit parameter?
If so, return the name of the parameter.
isCallStackPredTy :: Type -> Bool Source #
isIPPred_maybe :: Type -> Maybe (FastString, Type) Source #
Decomposes a predicate if it is an implicit parameter. Does not look in superclasses. See also [Local implicit parameters].