ghc-7.10.3: The GHC API

Safe HaskellNone
LanguageHaskell2010

TcValidity

Synopsis

Documentation

checkValidTyFamEqn Source

Arguments

:: Maybe ClsInfo 
-> TyCon

of the type family

-> [TyVar]

bound tyvars in the equation

-> [Type]

type patterns

-> Type

rhs

-> SrcSpan 
-> TcM () 

Do validity checks on a type family equation, including consistency with any enclosing class instance head, termination, and lack of polytypes.

checkConsistentFamInst Source

Arguments

:: Maybe (Class, VarEnv Type)

Class of associated type and instantiation of class TyVars

-> TyCon

Family tycon

-> [TyVar]

Type variables of the family instance

-> [Type]

Type patterns from instance

-> TcM () 

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

type ClsInfo = (Class, VarEnv Type) Source

Extra information needed when type-checking associated types. The Class is the enclosing class, and the VarEnv Type maps class variables to their instance types.