The type-level-numbers package

[Tags:bsd3, library, test]

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 0.1.1.0

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

Changes in 0.1.0.3

* Fix build for GHC 7.4

Changes in 0.1.0.2:

* Fix URL in cabal file

Changes in 0.1.0.1:

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

Properties

Versions 0.1, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.1.1.0, 0.1.1.1
Dependencies base (>=3 && <5), template-haskell (>2.0) [details]
License BSD3
Author Alexey Khudyakov <alexey.skladnoy@gmail.com>
Maintainer Alexey Khudyakov <alexey.skladnoy@gmail.com>
Stability Unknown
Category Type System
Bug tracker https://github.com/bos/statistics/issues
Source repository head: hg clone http://bitbucket.org/Shimuuar/type-level-numbers
head: git clone https://github.com/Shimuuar/type-level-numbers
Uploaded Thu Jun 13 14:53:15 UTC 2013 by AlexeyKhudyakov
Distributions LTSHaskell:0.1.1.1, NixOS:0.1.1.1, Stackage:0.1.1.1, Tumbleweed:0.1.1.1
Downloads 2432 total (21 in the last 30 days)
Votes
0 []
Status Docs uploaded by user [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees