ANNOUNCE: type-level 0.1: Haskell type-level programming library

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ANNOUNCE: type-level 0.1: Haskell type-level programming library

Bugzilla from
The goal of the "Type-level" library is to standardize and extend the
features offered by the multiple (and heterogeneous) type-level
programming implementations already around.

To date, type-level Booleans and arbitrary sized Naturals  are supported.

I implemented a few things I didn't see in any other type-level
programming libraries:

* Numerals use decimal representation to make error reports friendlier.

* Type-level numerals can be intuitively typed in different bases
(although everything is internally represented in base 10) by using

D16 represents the type-level decimal 16
B1010 represents the type-level binary 1010
076 represents the type-level octal 76
HFF represents the type-level hexadecimal FF

* All basic arithmetic operations are supported (including logarithm
and exponentiation in any base)

* The library provides reification of Naturals and Booleans (from
value-level to type-level) .

To get the code:

HackageDB page (including haddock documentation):

Darcs repository:

Big Thanks to Oleg and Wolfgang for their suggestions and
contributions. Actually, most of the implementation of Naturals is
based on Oleg's  "Binary Type Arithmetic"
Haskell-Cafe mailing list
[hidden email]