Vectorise.Monad.Local

ghc-8.2.1.20171030: The GHC API

Safe Haskell | None
Language | Haskell2010

Vectorise.Monad.Local

Synopsis

- readLEnv :: (LocalEnv -> a) -> VM a
- setLEnv :: LocalEnv -> VM ()
- updLEnv :: (LocalEnv -> LocalEnv) -> VM ()
- localV :: VM a -> VM a
- closedV :: VM a -> VM a
- getBindName :: VM FastString
- inBind :: Id -> VM a -> VM a
- lookupTyVarPA :: Var -> VM (Maybe CoreExpr)
- defLocalTyVar :: TyVar -> VM ()
- defLocalTyVarWithPA :: TyVar -> CoreExpr -> VM ()
- localTyVars :: VM [TyVar]

# Documentation

readLEnv :: (LocalEnv -> a) -> VM a Source #

Project something from the local environment.

setLEnv :: LocalEnv -> VM () Source #

Set the local environment.

updLEnv :: (LocalEnv -> LocalEnv) -> VM () Source #

Update the environment using the provided function.

localV :: VM a -> VM a Source #

Perform a computation in its own local environment. This does not alter the environment of the current state.

closedV :: VM a -> VM a Source #

Perform a computation in an empty local environment.

getBindName :: VM FastString Source #

Get the name of the local binding currently being vectorised.

inBind :: Id -> VM a -> VM a Source #

Run a vectorisation computation in a local environment, with this id set as the current binding.

lookupTyVarPA :: Var -> VM (Maybe CoreExpr) Source #

Lookup a PA tyvars from the local environment.

defLocalTyVar :: TyVar -> VM () Source #

Add a tyvar to the local environment.

defLocalTyVarWithPA :: TyVar -> CoreExpr -> VM () Source #

Add mapping between a tyvar and pa dictionary to the local environment.

localTyVars :: VM [TyVar] Source #

Get the set of tyvars from the local environment.