| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Language.QBE.Simulator.Default.State
Contents
Synopsis
- data Env v b = Env {
- envSyms :: Map GlobalIdent Address
- envFuncs :: Map GlobalIdent FuncDef
- envFuncAddrs :: Map Address GlobalIdent
- envMem :: Memory IOArray b
- envStk :: [StackFrame v]
- envStkPtr :: v
- envDataPtr :: Address
- type DataMem = [(Address, DataDef)]
- mkEnv :: (Storable v b, ValueRepr v) => Program -> Address -> Size -> IO (Env v b)
- initData :: (Storable v b, ValueRepr v) => DataMem -> StateT (Env v b) IO ()
- loadObj :: (Storable v b, ValueRepr v) => Address -> DataObj -> StateT (Env v b) IO Address
- storeValues :: Storable v b => Address -> [v] -> StateT (Env v b) IO Address
- newtype SimState v b a = SimState {
- unSimState :: StateT (Env v b) IO a
- unliftCatch :: Exception t => StateT s IO a -> (t -> StateT s IO a) -> StateT s IO a
- run :: (ValueRepr v, Storable v b) => Env v b -> SimState v b a -> IO a
Interpreter State
Constructors
| Env | |
Fields
| |
loadObj :: (Storable v b, ValueRepr v) => Address -> DataObj -> StateT (Env v b) IO Address Source #
State Monad
newtype SimState v b a Source #
Simulator state, parameterized over a value and byte representation.
Constructors
| SimState | |
Fields
| |
Instances
unliftCatch :: Exception t => StateT s IO a -> (t -> StateT s IO a) -> StateT s IO a Source #
Unlift IOException handling into a generic StateT monad.
See also: https://hackage.haskell.org/package/unliftio.