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 alfonso.acosta@gmail.com
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
aliases:

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):
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/type-level-0.1

Darcs repository: http://code.haskell.org/type-level/


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"
http://okmij.org/ftp/Haskell/types.html#binary-arithm
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe