ghc-7.8.4: The GHC API

Safe Haskell | None
Language | Haskell98

Vectorise.Builtins

Contents

- Restrictions
- Builtins
- Wrapped selectors
- Initialisation

Synopsis

- mAX_DPH_SCALAR_ARGS :: Int
- data Builtins = Builtins {
  - parrayTyCon :: TyCon
  - pdataTyCon :: TyCon
  - pdatasTyCon :: TyCon
  - prClass :: Class
  - prTyCon :: TyCon
  - preprTyCon :: TyCon
  - paClass :: Class
  - paTyCon :: TyCon
  - paDataCon :: DataCon
  - paPRSel :: Var
  - replicatePDVar :: Var
  - replicatePD_PrimVars :: NameEnv Var
  - emptyPDVar :: Var
  - emptyPD_PrimVars :: NameEnv Var
  - packByTagPDVar :: Var
  - packByTagPD_PrimVars :: NameEnv Var
  - combinePDVars :: Array Int Var
  - combinePD_PrimVarss :: Array Int (NameEnv Var)
  - scalarClass :: Class
  - scalarZips :: Array Int Var
  - voidTyCon :: TyCon
  - voidVar :: Var
  - fromVoidVar :: Var
  - sumTyCons :: Array Int TyCon
  - wrapTyCon :: TyCon
  - pvoidVar :: Var
  - pvoidsVar :: Var
  - closureTyCon :: TyCon
  - closureVar :: Var
  - liftedClosureVar :: Var
  - applyVar :: Var
  - liftedApplyVar :: Var
  - closureCtrFuns :: Array Int Var
  - selTys :: Array Int Type
  - selsTys :: Array Int Type
  - selsLengths :: Array Int CoreExpr
  - selReplicates :: Array Int CoreExpr
  - selTagss :: Array Int CoreExpr
  - selElementss :: Array (Int, Int) CoreExpr
  - liftingContext :: Var
  }
- selTy :: Int -> Builtins -> Type
- selsTy :: Int -> Builtins -> Type
- selReplicate :: Int -> Builtins -> CoreExpr
- selTags :: Int -> Builtins -> CoreExpr
- selElements :: Int -> Int -> Builtins -> CoreExpr
- selsLength :: Int -> Builtins -> CoreExpr
- sumTyCon :: Int -> Builtins -> TyCon
- prodTyCon :: Int -> Builtins -> TyCon
- prodDataCon :: Int -> Builtins -> DataCon
- replicatePD_PrimVar :: TyCon -> Builtins -> Var
- emptyPD_PrimVar :: TyCon -> Builtins -> Var
- packByTagPD_PrimVar :: TyCon -> Builtins -> Var
- combinePDVar :: Int -> Builtins -> Var
- combinePD_PrimVar :: Int -> TyCon -> Builtins -> Var
- scalarZip :: Int -> Builtins -> Var
- closureCtrFun :: Int -> Builtins -> Var
- initBuiltins :: DsM Builtins
- initBuiltinVars :: Builtins -> DsM [(Var, Var)]

# Restrictions

mAX_DPH_SCALAR_ARGS :: Int

# Builtins

data Builtins

Holds the names of the types and functions from `Prim` that are used by the vectoriser.

Constructors

Builtins |

Fields

parrayTyCon :: TyCon

  PArray

pdataTyCon :: TyCon

  PData

pdatasTyCon :: TyCon

  PDatas

prClass :: Class

  PR

prTyCon :: TyCon

  PR

preprTyCon :: TyCon

  PRepr

paClass :: Class

  PA

paTyCon :: TyCon

  PA

paDataCon :: DataCon

  PA

paPRSel :: Var

  PA

replicatePDVar :: Var

  replicatePD

replicatePD_PrimVars :: NameEnv Var

  replicatePD_Int# etc.

emptyPDVar :: Var

  emptyPD

emptyPD_PrimVars :: NameEnv Var

  emptyPD_Int# etc.

packByTagPDVar :: Var

  packByTagPD

packByTagPD_PrimVars :: NameEnv Var

  packByTagPD_Int# etc.

combinePDVars :: Array Int Var

  combinePD

combinePD_PrimVarss :: Array Int (NameEnv Var)

  combine2PD_Int# etc.

scalarClass :: Class

  Scalar

scalarZips :: Array Int Var

  map, zipWith, zipWith3

voidTyCon :: TyCon

  Void

voidVar :: Var

  void

fromVoidVar :: Var

  fromVoid

sumTyCons :: Array Int TyCon

  Sum2 .. Sum3

wrapTyCon :: TyCon

  Wrap

pvoidVar :: Var

  pvoid

pvoidsVar :: Var

  pvoids

closureTyCon :: TyCon

  :->

closureVar :: Var

  closure

liftedClosureVar :: Var

  liftedClosure

applyVar :: Var

  $:

liftedApplyVar :: Var

  liftedApply

closureCtrFuns :: Array Int Var

  closure1 .. closure3

selTys :: Array Int Type

  Sel2

selsTys :: Array Int Type

  Sels2

selsLengths :: Array Int CoreExpr

  lengthSels2

selReplicates :: Array Int CoreExpr

  replicate2

selTagss :: Array Int CoreExpr

  tagsSel2

selElementss :: Array (Int, Int) CoreExpr

  elementsSel2_0 .. elementsSel_2_1

liftingContext :: Var

  lc

# Wrapped selectors

selTy :: Int -> Builtins -> Type

selsTy :: Int -> Builtins -> Type

selReplicate :: Int -> Builtins -> CoreExpr

selTags :: Int -> Builtins -> CoreExpr

selElements :: Int -> Int -> Builtins -> CoreExpr

selsLength :: Int -> Builtins -> CoreExpr

sumTyCon :: Int -> Builtins -> TyCon

prodTyCon :: Int -> Builtins -> TyCon

prodDataCon :: Int -> Builtins -> DataCon

replicatePD_PrimVar :: TyCon -> Builtins -> Var

emptyPD_PrimVar :: TyCon -> Builtins -> Var

packByTagPD_PrimVar :: TyCon -> Builtins -> Var

combinePDVar :: Int -> Builtins -> Var

combinePD_PrimVar :: Int -> TyCon -> Builtins -> Var

scalarZip :: Int -> Builtins -> Var

closureCtrFun :: Int -> Builtins -> Var

# Initialisation

initBuiltins :: DsM Builtins

Create the initial map of builtin types and functions.

initBuiltinVars :: Builtins -> DsM [(Var, Var)]

Get the mapping of names in the Prelude to names in the DPH library.