haskell / 9 / libraries / base-4.17.0.0 / ghc-typenats-internal.html

GHC.TypeNats.Internal

Safe Haskell Trustworthy
Language Haskell2010

Description

This module exports the Type Nat kind as well as the comparison type family for that kinds. It is needed to prevent module cycles while still allowing these identifiers to be improted in Ord.

Since: base-4.16.0.0

data Natural Source

Natural number

Invariant: numbers <= 0xffffffffffffffff use the NS constructor

Instances
Instances details
Data Natural Source

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Natural -> c Natural Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Natural Source

toConstr :: Natural -> Constr Source

dataTypeOf :: Natural -> DataType Source

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Natural) Source

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Natural) Source

gmapT :: (forall b. Data b => b -> b) -> Natural -> Natural Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r Source

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Natural -> r Source

gmapQ :: (forall d. Data d => d -> u) -> Natural -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> Natural -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Natural -> m Natural Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Natural -> m Natural Source

Bits Natural Source

Since: base-4.8.0

Instance details

Defined in GHC.Bits

Enum Natural Source

Since: base-4.8.0.0

Instance details

Defined in GHC.Enum

Ix Natural Source

Since: base-4.8.0.0

Instance details

Defined in GHC.Ix

Num Natural Source

Note that Natural's Num instance isn't a ring: no element but 0 has an additive inverse. It is a semiring though.

Since: base-4.8.0.0

Instance details

Defined in GHC.Num

Read Natural Source

Since: base-4.8.0.0

Instance details

Defined in GHC.Read

Integral Natural Source

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Real Natural Source

Since: base-4.8.0.0

Instance details

Defined in GHC.Real

Show Natural Source

Since: base-4.8.0.0

Instance details

Defined in GHC.Show

PrintfArg Natural Source

Since: base-4.8.0.0

Instance details

Defined in Text.Printf

Eq Natural
Instance details

Defined in GHC.Num.Natural

Ord Natural
Instance details

Defined in GHC.Num.Natural

KnownNat n => HasResolution (n :: Nat) Source

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

Instance details

Defined in Data.Fixed

Methods

resolution :: p n -> Integer Source

type Compare (a :: Natural) (b :: Natural) Source
Instance details

Defined in Data.Type.Ord

type Compare (a :: Natural) (b :: Natural) = CmpNat a b

type family CmpNat (m :: Natural) (n :: Natural) :: Ordering Source

Comparison of type-level naturals, as a function.

Since: base-4.7.0.0

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/9.4.2/docs/libraries/base-4.17.0.0/GHC-TypeNats-Internal.html