| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
GHC.Tc.Validity
Synopsis
- data Rank
- data UserTypeCtxt
- = FunSigCtxt Name ReportRedundantConstraints
- | InfSigCtxt Name
- | ExprSigCtxt ReportRedundantConstraints
- | KindSigCtxt
- | StandaloneKindSigCtxt Name
- | TypeAppCtxt
- | ConArgCtxt Name
- | TySynCtxt Name
- | PatSynCtxt Name
- | PatSigCtxt
- | RuleSigCtxt Name
- | ForSigCtxt Name
- | DefaultDeclCtxt
- | InstDeclCtxt Bool
- | SpecInstCtxt
- | GenSigCtxt
- | GhciCtxt Bool
- | ClassSCCtxt Name
- | SigmaCtxt
- | DataTyCtxt Name
- | DerivClauseCtxt
- | TyVarBndrKindCtxt Name
- | DataKindCtxt Name
- | TySynKindCtxt Name
- | TyFamResKindCtxt Name
- checkValidType :: UserTypeCtxt -> Type -> TcM ()
- checkValidMonoType :: Type -> TcM ()
- checkValidTheta :: UserTypeCtxt -> ThetaType -> TcM ()
- checkValidInstance :: UserTypeCtxt -> LHsSigType GhcRn -> Type -> TcM ()
- checkValidInstHead :: UserTypeCtxt -> Class -> [Type] -> TcM ()
- validDerivPred :: TyVarSet -> PredType -> Bool
- checkTySynRhs :: UserTypeCtxt -> TcType -> TcM ()
- checkValidCoAxiom :: CoAxiom Branched -> TcM ()
- checkValidCoAxBranch :: TyCon -> CoAxBranch -> TcM ()
- checkValidTyFamEqn :: TyCon -> [Var] -> [Type] -> Type -> TcM ()
- checkValidAssocTyFamDeflt :: TyCon -> [Type] -> TcM ()
- checkConsistentFamInst :: AssocInstInfo -> TyCon -> CoAxBranch -> TcM ()
- badATErr :: Name -> Name -> SDoc
- arityErr :: Outputable a => SDoc -> a -> Int -> Int -> SDoc
- checkTyConTelescope :: TyCon -> TcM ()
- allDistinctTyVars :: TyVarSet -> [KindOrType] -> Bool
Documentation
data UserTypeCtxt #
Constructors
| FunSigCtxt Name ReportRedundantConstraints | |
| InfSigCtxt Name | |
| ExprSigCtxt ReportRedundantConstraints | |
| KindSigCtxt | |
| StandaloneKindSigCtxt Name | |
| TypeAppCtxt | |
| ConArgCtxt Name | |
| TySynCtxt Name | |
| PatSynCtxt Name | |
| PatSigCtxt | |
| RuleSigCtxt Name | |
| ForSigCtxt Name | |
| DefaultDeclCtxt | |
| InstDeclCtxt Bool | |
| SpecInstCtxt | |
| GenSigCtxt | |
| GhciCtxt Bool | |
| ClassSCCtxt Name | |
| SigmaCtxt | |
| DataTyCtxt Name | |
| DerivClauseCtxt | |
| TyVarBndrKindCtxt Name | |
| DataKindCtxt Name | |
| TySynKindCtxt Name | |
| TyFamResKindCtxt Name |
checkValidType :: UserTypeCtxt -> Type -> TcM () Source #
checkValidMonoType :: Type -> TcM () Source #
checkValidTheta :: UserTypeCtxt -> ThetaType -> TcM () Source #
checkValidInstance :: UserTypeCtxt -> LHsSigType GhcRn -> Type -> TcM () Source #
checkValidInstHead :: UserTypeCtxt -> Class -> [Type] -> TcM () Source #
validDerivPred :: TyVarSet -> PredType -> Bool Source #
checkTySynRhs :: UserTypeCtxt -> TcType -> TcM () Source #
checkValidCoAxiom :: CoAxiom Branched -> TcM () Source #
checkValidCoAxBranch :: TyCon -> CoAxBranch -> TcM () Source #
Arguments
| :: TyCon | of the type family |
| -> [Var] | Bound variables in the equation |
| -> [Type] | Type patterns |
| -> Type | Rhs |
| -> TcM () |
Do validity checks on a type family equation, including consistency with any enclosing class instance head, termination, and lack of polytypes.
checkValidAssocTyFamDeflt Source #
Checks that an associated type family default:
- Only consists of arguments that are bare type variables, and
- Has a distinct type variable in each argument.
See Note [Type-checking default assoc decls] in GHC.Tc.TyCl.
checkConsistentFamInst Source #
Arguments
| :: AssocInstInfo | |
| -> TyCon | Family tycon |
| -> CoAxBranch | |
| -> TcM () |
checkTyConTelescope :: TyCon -> TcM () Source #
allDistinctTyVars :: TyVarSet -> [KindOrType] -> Bool Source #