ghc-lib-0.20210201: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.Tc.Validity

Synopsis

Documentation

data Rank Source #

Instances

Instances details
Outputable Rank Source # 
Instance details

Defined in GHC.Tc.Validity

Methods

ppr :: Rank -> SDoc

checkValidInstance :: UserTypeCtxt -> LHsSigType GhcRn -> Type -> TcM () Source #

validDerivPred :: TyVarSet -> PredType -> Bool Source #

checkValidCoAxiom :: CoAxiom Branched -> TcM () Source #

checkValidCoAxBranch :: TyCon -> CoAxBranch -> TcM () Source #

checkValidTyFamEqn 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 #

Arguments

:: TyCon

of the type family

-> [Type]

Type patterns

-> TcM () 

Checks that an associated type family default:

  1. Only consists of arguments that are bare type variables, and
  2. 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 () 

badATErr :: Name -> Name -> SDoc Source #

arityErr :: Outputable a => SDoc -> a -> Int -> Int -> SDoc Source #