Compiling Haskell to cryptographic circuits.
This defines a Cartesian closed category for Snårkl and provides tooling to work with the Categorifier GHC plugin. Among other things, this can produce an R1CS in libsnark format.
For tested correct code, see the examples. It is important to look at the build files as well to see how the plugin is enabled.
There are many more examples (for different categories) upstream in the Categorifier repo.