ghc-7.6.1: The GHC API

Safe HaskellNone

FamInstEnv

Synopsis

Documentation

mkSynFamInst

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.

mkDataFamInst

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 FamilyInstEnv

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

lookupFamInstEnvConflicts :: FamInstEnvs -> FamInst -> [TyVar] -> [FamInstMatch]

lookupFamInstEnvConflicts' :: FamInstEnv -> FamInst -> [TyVar] -> [FamInstMatch]