Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Implements an effect for interactions with the architectural state, upon which instructions are executed (register file, memory, program counter, etc.).
Synopsis
- data Size
- bitSize :: Size -> Int
- data Operations v r where
- ReadRegister :: v -> Operations v v
- WriteRegister :: v -> v -> Operations v ()
- Load :: Size -> v -> Operations v v
- Store :: Size -> v -> v -> Operations v ()
- WritePC :: v -> Operations v ()
- ReadPC :: Operations v v
- Exception :: v -> String -> Operations v ()
- Ecall :: v -> Operations v ()
- Ebreak :: v -> Operations v ()
- ebreak :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs ()
- ecall :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs ()
- exception :: forall v. forall effs. Member (Operations v) effs => v -> String -> Eff effs ()
- readPC :: forall v. forall effs. Member (Operations v) effs => Eff effs v
- writePC :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs ()
- store :: forall v. forall effs. Member (Operations v) effs => Size -> v -> v -> Eff effs ()
- load :: forall v. forall effs. Member (Operations v) effs => Size -> v -> Eff effs v
- writeRegister :: forall v. forall effs. Member (Operations v) effs => v -> v -> Eff effs ()
- readRegister :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs v
Documentation
Abstraction for expressing a 8-, 16-, or 32-bit size.
data Operations v r where Source #
ReadRegister :: v -> Operations v v | |
WriteRegister :: v -> v -> Operations v () | |
Load :: Size -> v -> Operations v v | |
Store :: Size -> v -> v -> Operations v () | |
WritePC :: v -> Operations v () | |
ReadPC :: Operations v v | |
Exception :: v -> String -> Operations v () | |
Ecall :: v -> Operations v () | |
Ebreak :: v -> Operations v () |
exception :: forall v. forall effs. Member (Operations v) effs => v -> String -> Eff effs () Source #
store :: forall v. forall effs. Member (Operations v) effs => Size -> v -> v -> Eff effs () Source #
writeRegister :: forall v. forall effs. Member (Operations v) effs => v -> v -> Eff effs () Source #
readRegister :: forall v. forall effs. Member (Operations v) effs => v -> Eff effs v Source #