Expand description
Unsigned, unbounded type-level integers through a ternary representation. Nat
constants
are provided, from U0
(unsigned zero) to U81
(unsigned 81) as well as 3^5
(U243
.)
Structs§
Traits§
- Nat
- The
Nat
kind is for unsigned type-level integers, including zero (henceNat
, for “natural number”). We use a ternary representation here, for symmetry with our signed number representation - a binary representation may eventually be included because of its ease of division and multiplication by two. Our ternary representation is essentially a compile-time linked list of types, where the least-significant digit is at the head of the list: - NatPair
- The
NatPair
trait andNat2
struct represent 2-tuples ofNat
s. They are used internally for type-level logic.