A practical arithmetic encoding (aka Godel numbering) library. https://github.com/emc2/arith-encode
|Latest on Hackage:||1.0.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
A library providing tools and various schemes for encoding arbitrary datatypes as natural numbers. The underlying theory is that of isomorphisms with the natural numbers (known as Godel numbering). The library provides functionality for defining multiple such encodings for a given datatype, as well as a collection of stock encodings and combinators which can be used to build more complex encodings.
This has various uses, among them binary serialization/deserialization and enumeration testing.