circ-0.0.4: A Compiler IR Compiler.

Safe HaskellSafe-Infered

Language.CIRC.Runtime

Description

The runtime library for CIRC generated code.

Synopsis

Documentation

type CIRC = State (Int, [(String, Int)])Source

The CIRC transform monad. Used to create fresh ids.

evalCIRC :: CIRC a -> Int -> aSource

Evaluates a CIRC transform.

runCIRC :: CIRC a -> Int -> (a, Int)Source

Evaluates a CIRC transform, also returning the fresh next id.

type Id = StringSource

Identifiers.

newId :: CIRC IdSource

Produces a fresh id.

idId :: Id -> CIRC IntSource

Returns a unqiue int for a given id.