compilation-0.0.0.2: Haskell functionality for quickly assembling simple compilers.

Safe HaskellSafe-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).

Synopsis

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

project :: a -> [[b]]Source

inject :: [[b]] -> a -> aSource

nest :: [b] -> Compilation a ()Source

unnest :: Compilation a [b]Source

depth :: Compilation a IntegerSource