Safe Haskell | Safe-Inferred |
---|
Control.Compilation.Sequence
Description
Compilation Monad and combinators for quickly assembling simple compilers.
Control/Compilation/Sequence.hs
A generic compilation monad for quickly assembling simple compilers for target languages that are primarily sequences of instructions (possibly with nesting, e.g., loop constructs or procedures).
- class StateExtension a => Sequence a b where
- project :: a -> [[b]]
- inject :: [[b]] -> a -> a
- nest :: [b] -> Compilation a ()
- unnest :: Compilation a [b]
- depth :: Compilation a Integer
Documentation
class StateExtension a => Sequence a b whereSource
State extension class definition, and combinators for compiling into a sequence (possibly with nested blocks) of instructions.
Methods
inject :: [[b]] -> a -> aSource
nest :: [b] -> Compilation a ()Source
unnest :: Compilation a [b]Source