ghc-7.6.3: The GHC API

Safe Haskell | None

Vectorise.Type.Type

Synopsis

- vectTyCon :: TyCon -> VM TyCon
- vectAndLiftType :: Type -> VM (Type, Type)
- vectType :: Type -> VM Type

# Documentation

vectTyCon :: TyCon -> VM TyCon

Vectorise a type constructor.

vectAndLiftType :: Type -> VM (Type, Type)

Produce the vectorised and lifted versions of a type.

NB: Here we are limited to properly handle predicates at the toplevel only. Anything embedded in what is called the `body_ty` below will end up as an argument to the type family `PData`.

vectType :: Type -> VM Type

Vectorise a type.

For each quantified var we need to add a PA dictionary out the front of the type. So forall a. C a => a -> a turns into forall a. PA a => Cv a => a :-> a