ghc-7.2.2: The GHC API




paDictArgType :: TyVar -> VM (Maybe Type)Source

Construct the PA argument type for the tyvar. For the tyvar (v :: *) it's just PA v. For (v :: (* -> *) -> *) it's

 forall (a :: * -> *). (forall (b :: *). PA b -> PA (a b)) -> PA (v a)

paDictOfType :: Type -> VM CoreExprSource

Get the PA dictionary for some type

prDictOfReprType :: Type -> VM CoreExprSource

Get the PR dictionary for a type. The argument must be a representation type.

prDictOfPReprInstTyCon :: Type -> TyCon -> [Type] -> VM CoreExprSource

Given a type ty, its PRepr synonym tycon and its type arguments, return the PR PRepr ty. Suppose we have:

 type instance PRepr (T a1 ... an) = t

which is internally translated into

 type :R:PRepr a1 ... an = t

and the corresponding coercion. Then,

 prDictOfPReprInstTyCon (T a1 ... an) :R:PRepr u1 ... un = PR (T u1 ... un)

Note that ty is only used for error messages