# Frame

The frame is a preprocessor written in OCaml which statically links together
multiple Cammy expressions. The frame takes any nullary functor which is not
standard, and treats it as a file path into a tree of Cammy expressions. Each
path is replaced with the expression at that path.

# Jelly

The jelly optimizer is a Cammy-to-Cammy optimizer which uses e-graphs to
search for the smallest equivalent expression. The rule engine is from the
`egg` library. The rules are written in a DSL embedded in Rust, along with
comments explaining their provenance and correctness.

To update Cargo dependencies for jelly:

    $ pushd jelly/
    $ cargo metadata
    $ crate2nix generate

# Movelist

The movelist is a relational typechecker written in CHICKEN Scheme's dialect
of miniKanren. It can typecheck a Cammy expression, or take a type
representation and synthesize Cammy expressions with the given type.

To update eggs for movelist:

    $ egg2nix movelist/eggs.scm > movelist/eggs.nix

# Shell Environment

The environment for developing the Cammy toolchain is contained within
`shell.nix`.

To update eggs for the shell environment:

    $ egg2nix eggs.scm > eggs.nix

# Hive Documentation

The toolchain can generate documentation for hives. To generate PDF
documentation:

    $ cammy-weave hive/ | pandoc -o doc.pdf

And to generate HTML documentation:

    $ cammy-weave hive/ | pandoc --mathml -o doc.html
