HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

ModuleChasingBottoms-1.3.1.17Haskell2010

Test.ChasingBottoms.Nat

A simple implementation of natural numbers on top of Integers. Note that since Integers are used there is no infinite natural number; in other words, succ is strict.

  • 1 type
  • 4 values
newtypenewtype Nat
#

Natural numbers.

No Data instance is provided, because the implementation should be abstract.

Instances9Enum, Eq, Integral, Num, Ord, Real, …
  • Enum NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • Eq NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • Integral NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • Num NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • Ord NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • Real NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • Show NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • Arbitrary NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
  • CoArbitrary NatDefined in ChasingBottoms-1.3.1.17 · Test.ChasingBottoms.Nat
valuenatrec :: a -> (Nat -> a -> a) -> Nat -> a
#

natrec performs primitive recursion on natural numbers.