Copyright | (C) 2015-2022 mniip |
---|---|
License | BSD3 |
Maintainer | mniip <mniip@mniip.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Documentation
newtype Finite (n :: Nat) Source #
Finite number type.
is inhabited by exactly Finite
nn
values
the range [0, n)
including 0
but excluding n
. Invariants:
getFinite x < natVal x
getFinite x >= 0
Instances
KnownNat n => Bounded (Finite n) Source # | Throws an error for |
KnownNat n => Enum (Finite n) Source # | |
Eq (Finite n) Source # | |
KnownNat n => Integral (Finite n) Source # |
|
Defined in Data.Finite.Internal | |
KnownNat n => Num (Finite n) Source # |
|
Ord (Finite n) Source # | |
Defined in Data.Finite.Internal | |
KnownNat n => Read (Finite n) Source # | |
KnownNat n => Real (Finite n) Source # | |
Defined in Data.Finite.Internal toRational :: Finite n -> Rational # | |
Show (Finite n) Source # | |
Generic (Finite n) Source # | |
NFData (Finite n) Source # | |
Defined in Data.Finite.Internal | |
type Rep (Finite n) Source # | |
Defined in Data.Finite.Internal |