ghc-7.6.1: The GHC API

Safe HaskellNone

FamInstEnv

Synopsis

Documentation

mkSynFamInstSource

Arguments

:: Name

Unique name for the coercion tycon

-> [TyVar]

Type parameters of the coercion (tvs)

-> TyCon

Family tycon (F)

-> [Type]

Type instance (ts)

-> Type

Representation tycon (R)

-> FamInst 

Create a coercion identifying a type family instance. It has the form Co tvs :: F ts ~ R, where Co is the coercion constructor built here, F the family tycon and R the right-hand side of the type family instance.

mkDataFamInstSource

Arguments

:: Name

Unique name for the coercion tycon

-> [TyVar]

Type parameters of the coercion (tvs)

-> TyCon

Family tycon (F)

-> [Type]

Type instance (ts)

-> TyCon

Representation tycon (R)

-> FamInst 

Create a coercion identifying a data or newtype representation type and its family instance. It has the form Co tvs :: F ts ~ R tvs, where Co is the coercion constructor built here, F the family tycon and R the (derived) representation tycon.

type FamInstEnv = UniqFM FamilyInstEnvSource

lookupFamInstEnv :: FamInstEnvs -> TyCon -> [Type] -> [FamInstMatch]Source