ghc-7.7.20130829: The GHC API

Safe HaskellNone

Vectorise.Utils.PADict

Synopsis

Documentation

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

paMethod :: (Builtins -> Var) -> (TyCon -> Builtins -> Var) -> Type -> VM CoreExprSource

Produce code that refers to a method of the PA class.

prDictOfReprType :: Type -> VM CoreExprSource

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

prDictOfPReprInstTyCon :: Type -> CoAxiom Unbranched -> [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