ghc-7.0.4: The GHC API

Vectorise.Monad.Global

Contents

- Vars
- Scalars
- TyCons
- Datacons
- PA Dictionaries
- PR Dictionaries

Synopsis

- readGEnv :: (GlobalEnv -> a) -> VM a
- setGEnv :: GlobalEnv -> VM ()
- updGEnv :: (GlobalEnv -> GlobalEnv) -> VM ()
- defGlobalVar :: Var -> Var -> VM ()
- globalScalars :: VM VarSet
- lookupTyCon :: TyCon -> VM (Maybe TyCon)
- lookupBoxedTyCon :: TyCon -> VM (Maybe TyCon)
- defTyCon :: TyCon -> TyCon -> VM ()
- lookupDataCon :: DataCon -> VM (Maybe DataCon)
- defDataCon :: DataCon -> DataCon -> VM ()
- lookupTyConPA :: TyCon -> VM (Maybe Var)
- defTyConPA :: TyCon -> Var -> VM ()
- defTyConPAs :: [(TyCon, Var)] -> VM ()
- lookupTyConPR :: TyCon -> VM (Maybe Var)

# Documentation

readGEnv :: (GlobalEnv -> a) -> VM aSource

Project something from the global environment.

setGEnv :: GlobalEnv -> VM ()Source

Set the value of the global environment.

updGEnv :: (GlobalEnv -> GlobalEnv) -> VM ()Source

Update the global environment using the provided function.

# Vars

defGlobalVar :: Var -> Var -> VM ()Source

Add a mapping between a global var and its vectorised version to the state.

# Scalars

globalScalars :: VM VarSet Source

Get the set of global scalar variables.

# TyCons

lookupTyCon :: TyCon -> VM (Maybe TyCon)Source

Lookup the vectorised version of a `TyCon` from the global environment.

lookupBoxedTyCon :: TyCon -> VM (Maybe TyCon)Source

Lookup the vectorised version of a boxed `TyCon` from the global environment.

defTyCon :: TyCon -> TyCon -> VM ()Source

Add a mapping between plain and vectorised `TyCon`s to the global environment.

# Datacons

lookupDataCon :: DataCon -> VM (Maybe DataCon)Source

Lookup the vectorised version of a `DataCon` from the global environment.

defDataCon :: DataCon -> DataCon -> VM ()Source

Add the mapping between plain and vectorised `DataCon`s to the global environment.

# PA Dictionaries

lookupTyConPA :: TyCon -> VM (Maybe Var)Source

Lookup a PA `TyCon` from the global environment.

defTyConPA :: TyCon -> Var -> VM ()Source

Add a mapping between a PA TyCon and is vectorised version to the global environment.

defTyConPAs :: [(TyCon, Var)] -> VM ()Source

Add several mapping between PA TyCons and their vectorised versions to the global environment.

# PR Dictionaries

lookupTyConPR :: TyCon -> VM (Maybe Var)Source