The implementations of all functions except for rem, quot, div, mod are supposed to be as non-strict as possible.
- data Nat
- cmpNatLT :: Nat -> Nat -> Ordering
- fromNat :: Num n => Nat -> n
- toNat :: (Integral n, Num n) => n -> Nat
- length :: [a] -> Nat
- take :: Nat -> [a] -> [a]
- drop :: Nat -> [a] -> [a]
- replicate :: Nat -> a -> [a]
- lengthNum :: (Enum n, Num n) => [a] -> n
- takeNum :: (Enum n, Num n) => n -> [a] -> [a]
- dropNum :: (Enum n, Num n) => n -> [a] -> [a]
- replicateNum :: (Enum n, Num n) => n -> a -> [a]
- divmodNat1 :: Nat1 -> Nat1 -> (Nat, Nat)
Natural numbers and zero
This function is used to implement lazy instances of compare and (<), (<=), (>), (>=). It is used to transfer information to more significant bits. Instead of yielding EQ it yields LT if the numbers are equal.
This is used for the implementation of fromInteger and toEnum.