ghc-7.10.1: The GHC API

Safe HaskellNone
LanguageHaskell2010

Vectorise.Vect

Description

Simple vectorised constructors and projections.

Synopsis

Documentation

type Vect a = (a, a) Source

Contains the vectorised and lifted versions of some thing.

vectorised :: Vect a -> a Source

Get the vectorised version of a thing.

lifted :: Vect a -> a Source

Get the lifted version of a thing.

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

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.

vTick :: Tickish Id -> VExpr -> VExpr Source

Make a vectorised note.

vLet :: VBind -> VExpr -> VExpr Source

Make a vectorised let expresion.

vLams Source

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 lc.

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

Apply an expression to a set of argument variables.

The lifted version is also applied to the variable of the lifting context.