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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

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, Additive, Subtractive, …
newtypenewtype Zn (n :: Nat)
#

A type level bounded natural

Instances20Eq, Num, Ord, Show, Additive, Subtractive, …
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