HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

ModuleChasingBottoms-1.3.1.16Haskell2010

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.16 · Test.ChasingBottoms.Nat
  • Eq NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
  • Integral NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
  • Num NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
  • Ord NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
  • Real NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
  • Show NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
  • Arbitrary NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
  • CoArbitrary NatDefined in ChasingBottoms-1.3.1.16 · Test.ChasingBottoms.Nat
valuenatrec :: a -> (Nat -> a -> a) -> Nat -> a
#

natrec performs primitive recursion on natural numbers.