ghc-lib-0.1.0: The GHC API, decoupled from GHC versions

Safe HaskellNone
LanguageHaskell2010

ClsInst

Synopsis

Documentation

data InstanceWhat Source #

Constructors

BuiltinInstance 
LocalInstance 
TopLevInstance 

Fields

Instances
Outputable InstanceWhat Source # 
Instance details

Defined in ClsInst

data AssocInstInfo Source #

Extra information about the parent instance declaration, needed when type-checking associated types. The Class is the enclosing class, the [TyVar] are the scoped type variable of the instance decl. The VarEnv Type maps class variables to their instance types.

Constructors

NotAssociated 
InClsInst 

Fields

  • ai_class :: Class
     
  • ai_tyvars :: [TyVar]

    The scoped tyvars of the instance Why scoped? See bind_me in TcValidity.checkConsistentFamInst

  • ai_inst_env :: VarEnv Type

    Maps class tyvars to their instance types See Note [Matching in the consistent-instantation check]