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.Nat

  • 3 types
  • 1 class
  • 12 values
  • Packagebasement-0.0.16
  • Exports24
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTypeNats.hs
typetype Nat = Natural
#

A type synonym for Natural.

Previously, this was an opaque data type, but it was changed to a type synonym.

Instances1HasResolution
  • KnownNat n => HasResolution nDefined in base-4.20.2.0 · Data.Fixed

    For example, Fixed 1000 will give you a Fixed with a resolution of 1000.

classclass KnownNat (n :: Nat) where
#

This class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.

typetype (<=) (x :: t) (y :: t) = Assert (x <=? y) (LeErrMsg x y)
#

Comparison (<=) of comparable types, as a constraint.

Nat convertion

11 declarations

Maximum bounds

1 declaration
familytype family NatNumMaxBound ty :: Nat
#

Get Maximum bounds of different Integral / Natural types related to Nat

Instances18NatNumMaxBound, …

Constraint

2 declarations