A chunky non-negative number is a list of non-negative numbers. It represents the sum of the list elements. It is possible to represent a finite number with infinitely many chunks by using an infinite number of zeros.
Note the following problems:
Addition is commutative only for finite representations.
E.g. let y = min (1+y) 2 in y is defined,
let y = min (y+1) 2 in y is not.
Instances11Enum, Eq, Integral, Num, Ord, Real, …
(Enum a, C a) => Enum (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivateC a => Eq (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivate(Integral a, C a) => Integral (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivate(C a, Num a) => Num (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivateC a => Ord (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivate(Real a, C a) => Real (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivateShow a => Show (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivateSemigroup (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivateMonoid (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivate(C a, Arbitrary a) => Arbitrary (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivateC a => C (T a)Defined in non-negative-0.1.2 · Numeric.NonNegative.ChunkyPrivateThis instance is not correct with respect to the equality check if the involved numbers contain zero chunks.