@hackage type-level-numbers0.1.1.2
Type level numbers implemented using type families.
Categories
License
BSD-3-Clause
Maintainer
Alexey Khudyakov <alexey.skladnoy@gmail.com>
Links
Versions
Installation
Dependencies (2)
- base >=3 && <5
- template-haskell >2.0 Show all…
Dependents (3)
@hackage/toysolver, @hackage/finite-field, @hackage/acme-everything
This is type level numbers implemented using type families. Natural numbers use binary encoding. With default context stack numbers up to 2^18-1 could 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.