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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 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.