The type-level-numbers package

[Tags: bsd3, library]

This is type level numbers implemented using type families. Natural numbers use binary encoding. With default context stack numbers up to 2^18-1 coudl be represented. Signed integer numbers use balanced ternary encoding.

Package is structured as folows:

* [@TypeLevel.Number.Classes@] contain generic type families such as Add

* [@TypeLevel.Number.Nat@] natural numbers implemented using binary encoding

* [@TypeLevel.Number.Int@] signed integers implemented using balanced ternary encoding

* [@TypeLevel.Boolean@] type level booleans

So far comparison of numbers, subtraction and multiplication of numbers are supported.

Changes in

* @withNat@, @withInt@, @SomeNat and @SomeInt@ added.

Changes in

* Fix build for GHC 7.4

Changes in

* Fix URL in cabal file

Changes in

* Workaround for GHC bug #4364 (Build failure on GHC 7.0)


Change logNone available
Dependenciesbase (>=3 && <5), template-haskell (>2.0) [details]
AuthorAlexey Khudyakov <>
MaintainerAlexey Khudyakov <>
CategoryType System
Bug tracker
Source repositoryhead: hg clone
head: git clone
UploadedThu Jun 13 14:53:15 UTC 2013 by AlexeyKhudyakov
DistributionsLTSHaskell:, NixOS:, Stackage:
Downloads2052 total (62 in last 30 days)
0 []
StatusDocs uploaded by user [build log]
Successful builds reported [all 1 reports]




Maintainers' corner

For package maintainers and hackage trustees