| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
TypeLevelShow.Natural
Synopsis
- type ShowNatBin n = ShowNatBase 2 ShowNatBinaryDigitSym n
- type ShowNatOct n = ShowNatBase 8 ShowNatOctalDigitSym n
- type ShowNatDec n = ShowNatBase 10 ShowNatDecimalDigitSym n
- type ShowNatHexLower n = ShowNatBase 16 ShowNatHexDigitLowerSym n
- type ShowNatHexUpper n = ShowNatBase 16 ShowNatHexDigitUpperSym n
- type family ShowNatBase base showDigit n where ...
- type family ShowNatBase' base showDigit acc n where ...
- type family ShowNatBinaryDigit (d :: Natural) :: Char where ...
- data ShowNatBinaryDigitSym d
- type family ShowNatOctalDigit (d :: Natural) :: Char where ...
- data ShowNatOctalDigitSym d
- type family ShowNatDecimalDigit (d :: Natural) :: Char where ...
- data ShowNatDecimalDigitSym d
- type family ShowNatHexDigitLower (d :: Natural) :: Char where ...
- data ShowNatHexDigitLowerSym d
- type family ShowNatHexDigitUpper (d :: Natural) :: Char where ...
- data ShowNatHexDigitUpperSym d
Documentation
type ShowNatBin n = ShowNatBase 2 ShowNatBinaryDigitSym n Source #
type ShowNatOct n = ShowNatBase 8 ShowNatOctalDigitSym n Source #
type ShowNatDec n = ShowNatBase 10 ShowNatDecimalDigitSym n Source #
type ShowNatHexLower n = ShowNatBase 16 ShowNatHexDigitLowerSym n Source #
type ShowNatHexUpper n = ShowNatBase 16 ShowNatHexDigitUpperSym n Source #
type family ShowNatBase base showDigit n where ... Source #
Render a type-level Natural in the given base using the given digit
printer.
Equations
| ShowNatBase base showDigit 0 = "0" | |
| ShowNatBase base showDigit n = ShowNatBase' base showDigit "" n |
type family ShowNatBase' base showDigit acc n where ... Source #
Equations
| ShowNatBase' base showDigit acc 0 = acc | |
| ShowNatBase' base showDigit acc n = ShowNatBase' base showDigit (ConsSymbol (showDigit @@ (n `Mod` base)) acc) (n `Div` base) |
type family ShowNatBinaryDigit (d :: Natural) :: Char where ... Source #
Equations
| ShowNatBinaryDigit 0 = '0' | |
| ShowNatBinaryDigit 1 = '1' |
data ShowNatBinaryDigitSym d Source #
Instances
| type App ShowNatBinaryDigitSym (d :: Natural) Source # | |
Defined in TypeLevelShow.Natural | |
type family ShowNatOctalDigit (d :: Natural) :: Char where ... Source #
Equations
| ShowNatOctalDigit 0 = '0' | |
| ShowNatOctalDigit 1 = '1' | |
| ShowNatOctalDigit 2 = '2' | |
| ShowNatOctalDigit 3 = '3' | |
| ShowNatOctalDigit 4 = '4' | |
| ShowNatOctalDigit 5 = '5' | |
| ShowNatOctalDigit 6 = '6' | |
| ShowNatOctalDigit 7 = '7' |
data ShowNatOctalDigitSym d Source #
Instances
| type App ShowNatOctalDigitSym (d :: Natural) Source # | |
Defined in TypeLevelShow.Natural | |
type family ShowNatDecimalDigit (d :: Natural) :: Char where ... Source #
Equations
| ShowNatDecimalDigit 0 = '0' | |
| ShowNatDecimalDigit 1 = '1' | |
| ShowNatDecimalDigit 2 = '2' | |
| ShowNatDecimalDigit 3 = '3' | |
| ShowNatDecimalDigit 4 = '4' | |
| ShowNatDecimalDigit 5 = '5' | |
| ShowNatDecimalDigit 6 = '6' | |
| ShowNatDecimalDigit 7 = '7' | |
| ShowNatDecimalDigit 8 = '8' | |
| ShowNatDecimalDigit 9 = '9' |
data ShowNatDecimalDigitSym d Source #
Instances
| type App ShowNatDecimalDigitSym (d :: Natural) Source # | |
Defined in TypeLevelShow.Natural | |
type family ShowNatHexDigitLower (d :: Natural) :: Char where ... Source #
Equations
| ShowNatHexDigitLower 0 = '0' | |
| ShowNatHexDigitLower 1 = '1' | |
| ShowNatHexDigitLower 2 = '2' | |
| ShowNatHexDigitLower 3 = '3' | |
| ShowNatHexDigitLower 4 = '4' | |
| ShowNatHexDigitLower 5 = '5' | |
| ShowNatHexDigitLower 6 = '6' | |
| ShowNatHexDigitLower 7 = '7' | |
| ShowNatHexDigitLower 8 = '8' | |
| ShowNatHexDigitLower 9 = '9' | |
| ShowNatHexDigitLower 10 = 'a' | |
| ShowNatHexDigitLower 11 = 'b' | |
| ShowNatHexDigitLower 12 = 'c' | |
| ShowNatHexDigitLower 13 = 'd' | |
| ShowNatHexDigitLower 14 = 'e' | |
| ShowNatHexDigitLower 15 = 'f' |
data ShowNatHexDigitLowerSym d Source #
Instances
| type App ShowNatHexDigitLowerSym (d :: Natural) Source # | |
Defined in TypeLevelShow.Natural | |
type family ShowNatHexDigitUpper (d :: Natural) :: Char where ... Source #
Equations
| ShowNatHexDigitUpper 0 = '0' | |
| ShowNatHexDigitUpper 1 = '1' | |
| ShowNatHexDigitUpper 2 = '2' | |
| ShowNatHexDigitUpper 3 = '3' | |
| ShowNatHexDigitUpper 4 = '4' | |
| ShowNatHexDigitUpper 5 = '5' | |
| ShowNatHexDigitUpper 6 = '6' | |
| ShowNatHexDigitUpper 7 = '7' | |
| ShowNatHexDigitUpper 8 = '8' | |
| ShowNatHexDigitUpper 9 = '9' | |
| ShowNatHexDigitUpper 10 = 'A' | |
| ShowNatHexDigitUpper 11 = 'B' | |
| ShowNatHexDigitUpper 12 = 'C' | |
| ShowNatHexDigitUpper 13 = 'D' | |
| ShowNatHexDigitUpper 14 = 'E' | |
| ShowNatHexDigitUpper 15 = 'F' |
data ShowNatHexDigitUpperSym d Source #
Instances
| type App ShowNatHexDigitUpperSym (d :: Natural) Source # | |
Defined in TypeLevelShow.Natural | |