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

Modulebasement-0.0.16Haskell2010

Basement.Bounded

Types to represent ℤ/nℤ.

ℤ/nℤ is a finite field and is defined as the set of natural number: {0, 1, ..., n − 1}.

  • 2 types
  • 6 values
  • Packagebasement-0.0.16
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBounded.hs
newtypenewtype Zn64 (n :: Nat)
#

A type level bounded natural backed by a Word64

Instances20Eq, Num, Ord, Show, Integral, Additive, …
newtypenewtype Zn (n :: Nat)
#

A type level bounded natural

Instances20Eq, Num, Ord, Show, Integral, Additive, …
valuezn :: KnownNat n => Natural -> Zn n
#

Create an element of ℤ/nℤ from a Natural.

If the value is greater than n, then the value is normalized by using the integer modulus n