type-level-tf: Type-level programming library (type families)
This library permits performing computations on the type-level. Type-level functions are implemented using functional dependencies of multi parameter type classes. To date, Booleans and Numerals (Naturals and Positives) are supported. With regard to Numerals, there is support for common arithmetic operations (addition, substraction, multiplication, division, exponientation, logarithm, maximum, comparison, GCD) over natural numbers (using a decimal representation to make compile-time errors friendlier). Although making use of type-level computations might seem devious and obfuscated at first sight, it is indeed useful in practice to implement lightweight dependent types such us number-parameterized types (e.g. an array type parameterized by the array's size or a modular group type Zn parameterized by the modulus).
Modules
[Index]
Downloads
- type-level-tf-0.2.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.2.1 |
---|---|
Dependencies | base (>=4 && <5), syb, template-haskell (>2.0) [details] |
Tested with | ghc ==6.9.0, ghc ==6.12.0, ghc ==7.2.1 |
License | BSD-3-Clause |
Copyright | Copyright (c) 2010 Corey O'Connor Copyright (c) 2008 Alfonso Acosta, Oleg Kiselyov, Wolfgang Jeltsch and KTH's SAM group 2008 Benedikt Huber (Rewrite using type families) |
Author | Corey O'Connor, Alfonso Acosta |
Maintainer | coreyoconnor@gmail.com |
Category | Data |
Home page | https://github.com/coreyoconnor/type-level-tf |
Source repo | head: git clone git://github.com/coreyoconnor/type-level-tf.git |
Uploaded | by CoreyOConnor at 2011-10-29T18:14:44Z |
Distributions | NixOS:0.2.1 |
Reverse Dependencies | 2 direct, 0 indirect [details] |
Downloads | 1269 total (12 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |