Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data Pred
- classifyPredType :: PredType -> Pred
- isPredTy :: HasDebugCallStack => Type -> Bool
- isEvVarType :: Type -> Bool
- data EqRel
- eqRelRole :: EqRel -> Role
- isEqPred :: PredType -> Bool
- isReprEqPred :: PredType -> Bool
- isEqClassPred :: PredType -> Bool
- isCoVarType :: Type -> Bool
- getEqPredTys :: PredType -> (Type, Type)
- getEqPredTys_maybe :: PredType -> Maybe (Role, Type, Type)
- getEqPredRole :: PredType -> Role
- predTypeEqRel :: PredType -> EqRel
- mkNomEqPred :: Type -> Type -> Type
- mkReprEqPred :: Type -> Type -> Type
- mkEqPred :: EqRel -> Type -> Type -> PredType
- mkEqPredRole :: Role -> Type -> Type -> PredType
- mkClassPred :: Class -> [Type] -> PredType
- isDictTy :: Type -> Bool
- typeDeterminesValue :: Type -> Bool
- isClassPred :: PredType -> Bool
- isEqualityClass :: Class -> Bool
- isCTupleClass :: Class -> Bool
- getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- getClassPredTys_maybe :: PredType -> Maybe (Class, [Type])
- classMethodTy :: Id -> Type
- classMethodInstTy :: Id -> [Type] -> Type
- isIPLikePred :: Type -> Bool
- mentionsIP :: Type -> Class -> [Type] -> Bool
- isIPTyCon :: TyCon -> Bool
- isIPClass :: Class -> Bool
- isCallStackTy :: Type -> Bool
- isCallStackPred :: Class -> [Type] -> Maybe FastString
- isCallStackPredTy :: Type -> Bool
- isExceptionContextPred :: Class -> [Type] -> Maybe FastString
- isIPPred_maybe :: Class -> [Type] -> Maybe (Type, Type)
- type DictId = EvId
- isEvVar :: Var -> Bool
- isDictId :: Id -> Bool
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.
isReprEqPred :: PredType -> Bool Source #
isEqClassPred :: PredType -> Bool Source #
isCoVarType :: Type -> Bool Source #
Does this type classify a core (unlifted) Coercion? At either role nominal or representational (t1 ~# t2) or (t1 ~R# t2) See Note [Types for coercions, predicates, and evidence] in GHC.Core.TyCo.Rep
getEqPredRole :: PredType -> Role Source #
predTypeEqRel :: PredType -> EqRel Source #
Get the equality relation relevant for a pred type Returns NomEq for dictionary predicates, etc
mkNomEqPred :: Type -> Type -> Type Source #
Creates a primitive nominal type equality predicate. t1 ~# t2 Invariant: the types are not Coercions
mkReprEqPred :: Type -> Type -> Type Source #
Creates a primitive representational type equality predicate. t1 ~R# t2 Invariant: the types are not Coercions
mkEqPred :: EqRel -> Type -> Type -> PredType Source #
Makes a lifted equality predicate at the given role
mkEqPredRole :: Role -> Type -> Type -> PredType Source #
Makes a lifted equality predicate at the given role
typeDeterminesValue :: Type -> Bool Source #
isClassPred :: PredType -> Bool Source #
isEqualityClass :: 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 #
isExceptionContextPred :: Class -> [Type] -> Maybe FastString Source #
Is a PredType
an ExceptionContext
implicit parameter?
If so, return the name of the parameter.