The sources are in src/Hardware/Chalk. There are several examples in the examples subdirectory. It has its own README file explaining the contents of the individual examples. At the moment, the top-level module, Hardware/Chalk/Chalk.hs probably exposes too much internal information to the users. Here's a quick overview of the source files: - Circuit.hs This file contains the core data types and instance declarations. One version used Template Haskell to record the location of pure components (by replacing the pure function with $pure splices, that recorded the location in the source file). There are still a few traces of this left in the current implementation. - Ref.hs A simple implementation of observable sharing using unsafePerformIO. As an alternative, we can build a pure backend to Chalk using the state monad's applicative functor interface. The downside of this is that we would need to introduce a custom fixed-point operator to make recursive circuits manifest. - Combinators.hs This module defines some useful combinators and smart constructors for the circuit data type. All fairly straightforward. - Simulate.hs This module defines some standard and non-standard interpretations of Chalk circuits. - Graph.hs This is a larger analysis of Chalk circuits. It defines two different visualisations of circuits: simpleGraph and graph. The simple version visualises the Chalk abstract syntax tree. The complicated version beautifies this tree into something a bit like a circuit diagram. The - Traverse.hs This defines a few traversal functions over the Circuit data type. It tries to capture a few common kinds of traversals to make it easier to define new non-standard interpretations. - Size.hs A few simple experiments about estimating a circuit's size (number of components) and structure (counting the subcomponents of a circuit).