# The type-level package

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). Here is a tutorial on type-level numerals and how to use them to implement numerically-parameterized vectors: http://www.ict.kth.se/org/ict/ecs/sam/projects/forsyde/www/files/tutorial/tutorial.html#FSVec

[Skip to Readme]

## Properties

Versions | 0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3.0 |
---|---|

Dependencies | base (>=3 && <5), template-haskell (>2.0) [details] |

License | BSD3 |

Copyright | Copyright (c) 2008 Alfonso Acosta, Oleg Kiselyov, Wolfgang Jeltsch and KTH's SAM group |

Author | Alfonso Acosta |

Maintainer | alfonso.acosta@gmail.com |

Category | Data |

Home page | http://code.haskell.org/type-level |

Uploaded | Mon Jul 27 08:31:47 UTC 2009 by LennartAugustsson |

Distributions | Debian:0.2.4, NixOS:0.3.0 |

Downloads | 3457 total (25 in the last 30 days) |

Rating | 0.0 (0 ratings) [clear rating] |

Status | Docs uploaded by user Build status unknown [no reports yet] Hackage Matrix CI |

## Downloads

- type-level-0.2.3.tar.gz [browse] (Cabal source package)
- Package description (included in the package)