Safe Haskell | Safe-Infered |
---|
- readGEnv :: (GlobalEnv -> a) -> VM a
- setGEnv :: GlobalEnv -> VM ()
- updGEnv :: (GlobalEnv -> GlobalEnv) -> VM ()
- defGlobalVar :: Var -> Var -> VM ()
- lookupVectDecl :: Var -> VM (Maybe (Type, CoreExpr))
- noVectDecl :: Var -> VM Bool
- globalScalarVars :: VM VarSet
- isGlobalScalarVar :: Var -> VM Bool
- globalScalarTyCons :: VM NameSet
- lookupTyCon :: TyCon -> VM (Maybe TyCon)
- defTyConName :: TyCon -> Name -> TyCon -> VM ()
- defTyCon :: TyCon -> TyCon -> VM ()
- globalVectTyCons :: VM (NameEnv TyCon)
- lookupDataCon :: DataCon -> VM (Maybe DataCon)
- defDataCon :: DataCon -> DataCon -> VM ()
- lookupTyConPA :: TyCon -> VM (Maybe Var)
- defTyConPAs :: [(TyCon, Var)] -> VM ()
- lookupTyConPR :: TyCon -> VM (Maybe Var)
Documentation
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.
Vectorisation declarations
lookupVectDecl :: Var -> VM (Maybe (Type, CoreExpr))Source
Check whether a variable has a (non-scalar) vectorisation declaration.
noVectDecl :: Var -> VM BoolSource
Check whether a variable has a NOVECTORISE
declaration.
Scalars
globalScalarVars :: VM VarSetSource
Get the set of global scalar variables.
isGlobalScalarVar :: Var -> VM BoolSource
Check whether a given variable is in the set of global scalar variables.
globalScalarTyCons :: VM NameSetSource
Get the set of global scalar type constructors including both those scalar type constructors declared in an imported module and those declared in the current module.
TyCons
lookupTyCon :: TyCon -> VM (Maybe TyCon)Source
Lookup the vectorised version of a TyCon
from the global environment.
defTyConName :: TyCon -> Name -> TyCon -> VM ()Source
Add a mapping between plain and vectorised TyCon
s to the global environment.
The second argument is only to enable tracing for (mutually) recursively defined type constructors, where we must not pull at the vectorised type constructors (because that would pull too early at the recursive knot).
defTyCon :: TyCon -> TyCon -> VM ()Source
Add a mapping between plain and vectorised TyCon
s to the global environment.
globalVectTyCons :: VM (NameEnv TyCon)Source
Get the set of all vectorised type constructors.
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 the PA
dfun of a vectorised type constructor in the global environment.
defTyConPAs :: [(TyCon, Var)] -> VM ()Source
Associate vectorised type constructors with the dfun of their PA
instances in the global
environment.