GHC.Tc.Validity
Documentation
Constructors
ArbitraryRank | |
LimitedRank Bool Rank | |
MonoTypeRankZero | |
MonoTypeTyConArg | |
MonoTypeSynArg | |
MonoTypeConstraint | |
MustBeMonoType |
Instances
data UserTypeCtxt Source #
UserTypeCtxt describes the origin of the polymorphic type in the places where we need an expression to have that type
Constructors
Instances
Eq UserTypeCtxt Source # | |
Defined in GHC.Tc.Types.Origin |
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 #
checkTySynRhs :: UserTypeCtxt -> TcType -> TcM () Source #
checkEscapingKind :: Type -> 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 () |
arityErr :: Outputable a => SDoc -> a -> Int -> Int -> TcRnMessage Source #
checkTyConTelescope :: TyCon -> TcM () Source #
allDistinctTyVars :: TyVarSet -> [KindOrType] -> Bool Source #