ghc-7.0.4: The GHC API

Vectorise.Vect

Description

Simple vectorised constructors and projections.

Synopsis

- type Vect a = (a, a)
- type VVar = Vect Var
- type VExpr = Vect CoreExpr
- type VBind = Vect CoreBind
- vectorised :: Vect a -> a
- lifted :: Vect a -> a
- mapVect :: (a -> b) -> Vect a -> Vect b
- vVarType :: VVar -> Type
- vNonRec :: VVar -> VExpr -> VBind
- vRec :: [VVar] -> [VExpr] -> VBind
- vVar :: VVar -> VExpr
- vType :: Type -> VExpr
- vNote :: Note -> VExpr -> VExpr
- vLet :: VBind -> VExpr -> VExpr
- vLams :: Var -> [VVar] -> VExpr -> VExpr
- vLamsWithoutLC :: [VVar] -> VExpr -> VExpr
- vVarApps :: Var -> VExpr -> [VVar] -> VExpr
- vCaseDEFAULT :: VExpr -> VVar -> Type -> Type -> VExpr -> VExpr

# Documentation

type Vect a = (a, a)Source

Contains the vectorised and lifted versions of some thing.

type VVar = Vect Var Source

type VExpr = Vect CoreExpr Source

type VBind = Vect CoreBind Source

vectorised :: Vect a -> aSource

Get the vectorised version of a thing.

lifted :: Vect a -> aSource

Get the lifted version of a thing.

mapVect :: (a -> b) -> Vect a -> Vect bSource

Apply some function to both the vectorised and lifted versions of a thing.

vVarType :: VVar -> Type Source

Get the type of a vectorised variable.

vNonRec :: VVar -> VExpr -> VBind Source

Make a vectorised non-recursive binding.

vRec :: [VVar] -> [VExpr] -> VBind Source

Make a vectorised recursive binding.

vVar :: VVar -> VExpr Source

Wrap a vectorised variable as a vectorised expression.

vType :: Type -> VExpr Source

Wrap a vectorised type as a vectorised expression.

vNote :: Note -> VExpr -> VExpr Source

Make a vectorised note.

vLet :: VBind -> VExpr -> VExpr Source

Make a vectorised let expresion.

vLamsSource

Arguments

:: Var | Var bound to the lifting context.
-> [VVar] | Parameter vars for the abstraction.
-> VExpr | Body of the abstraction.
-> VExpr |

Make a vectorised lambda abstraction. The lifted version also binds the lifting context.

vLamsWithoutLC :: [VVar] -> VExpr -> VExpr Source

Like `vLams` but the lifted version doesn't bind the lifting context.

vVarApps :: Var -> VExpr -> [VVar] -> VExpr Source

Apply some argument variables to an expression. The lifted version is also applied to the variable of the lifting context.

vCaseDEFAULT :: VExpr -> VVar -> Type -> Type -> VExpr -> VExpr Source