ghc-7.10.0.20150316: The GHC API

Safe HaskellNone
LanguageHaskell2010

TcEvidence

Synopsis

Documentation

newtype EvBindMap Source

Constructors

EvBindMap 

data EvBind Source

Constructors

EvBind EvVar EvTerm 

Instances

data EvTypeable Source

Instructions on how to make a Typeable dictionary.

Constructors

EvTypeableTyCon TyCon [Kind] [(EvTerm, Type)]

Dicitionary for concrete type constructors.

EvTypeableTyApp (EvTerm, Type) (EvTerm, Type)

Dictionary for type applications; this is used when we have a type expression starting with a type variable (e.g., Typeable (f a))

EvTypeableTyLit Type

Dictionary for a type literal.

pickLR :: LeftOrRight -> (a, a) -> a Source

maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion Source

If the EqRel is ReprEq, makes a TcSubCo; otherwise, does nothing. Note that the input coercion should always be nominal.

tcDowngradeRole Source

Arguments

:: Role

desired role

-> Role

current role

-> TcCoercion 
-> TcCoercion 

Change the role of a TcCoercion. Panics if this isn't a downgrade.

mkTcTransAppCo Source

Arguments

:: Role

r1

-> TcCoercion

co1 :: ty1a ~r1 ty1b

-> TcType

ty1a

-> TcType

ty1b

-> Role

r2

-> TcCoercion

co2 :: ty2a ~r2 ty2b

-> TcType

ty2a

-> TcType

ty2b

-> Role

r3

-> TcCoercion

:: ty1a ty2a ~r3 ty1b ty2b

Like mkTcAppCo, but allows the second coercion to be other than nominal. See Note [mkTcTransAppCo]. Role r3 cannot be more stringent than either r1 or r2.