Language-c99 is a Haskell library implementing the abstract syntax tree of C99. It strictly follows the C99 specification, as defined by the final committee draft. Typical C implementations in Haskell deviate from the standard to make using the library easier, or add features from newer C versions or compilers. These modifications make it harder to write high-assurance code, because there is no proof that the code actually adheres to the C99 AST.

Language-c99 has been made during the reimplementation of the C99 backend of Copilot. It gives us the extra certainty we need for the high-assurance systems Copilot has been designed for.

To aid writing code using the library, two support libraries give a more user-friendly wrapper on top of the bare C99 AST:

Source code

The source to the libraries are hosted on github and be cloned easily:

git clone
git clone
git clone

The repositories themselves can be found here:


All releases can be found on Hackage, and can be easily installed using cabal:

Currently the libraries are still in an early stage, and changes to API will occur before the 1.0 release!


Language-c99, language-c99-util and language-c99-simple are all distributed under the MIT license.