Vectorise.Builtins.Initialise

ghc-7.0.4: The GHC API

Vectorise.Builtins.Initialise

Contents

- Initialisation

Synopsis

- initBuiltins :: PackageId -> DsM Builtins
- initBuiltinVars :: Builtins -> DsM [(Var, Var)]
- initBuiltinTyCons :: Builtins -> DsM [(Name, TyCon)]
- initBuiltinDataCons :: Builtins -> [(Name, DataCon)]
- initBuiltinPAs :: Builtins -> (InstEnv, InstEnv) -> DsM [(Name, Var)]
- initBuiltinPRs :: Builtins -> (InstEnv, InstEnv) -> DsM [(Name, Var)]
- initBuiltinBoxedTyCons :: Builtins -> DsM [(Name, TyCon)]
- initBuiltinScalars :: Builtins -> DsM [Var]

# Initialisation

initBuiltins

Arguments

:: PackageId | package id the builtins are in, eg dph-common
-> 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.

initBuiltinTyCons :: Builtins -> DsM [(Name, TyCon)]

Get a list of names to `TyCon`s in the mock prelude.

initBuiltinDataCons :: Builtins -> [(Name, DataCon)]

Get a list of names to `DataCon`s in the mock prelude.

initBuiltinPAs :: Builtins -> (InstEnv, InstEnv) -> DsM [(Name, Var)]

Get the names of all buildin instance functions for the PA class.

initBuiltinPRs :: Builtins -> (InstEnv, InstEnv) -> DsM [(Name, Var)]

Get the names of all builtin instance functions for the PR class.

initBuiltinBoxedTyCons :: Builtins -> DsM [(Name, TyCon)]

Get a list of boxed `TyCons` in the mock prelude. This is Int only.

initBuiltinScalars :: Builtins -> DsM [Var]

Get a list of all scalar functions in the mock prelude.