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

Moduletext-printer-0.5.0.2Haskell2010

Text.Printer.Integral

Print integral numbers in common positional numeral systems.

  • 6 types
  • 2 classes
  • 44 values

Positional systems

8 declarations
classclass PositionalSystem s where
#

Positional numeral system.

Methods

Instances6PositionalSystem
classclass PositionalSystem s => BitSystem s where
#

Positonal numeral system with a power of two radix.

Methods

Instances5BitSystem
datadata Binary
#

The binary numeral system.

Instances8Eq, Ord, Read, Show, Generic, BitSystem, …
  • Eq BinaryDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Ord BinaryDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Read BinaryDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Show BinaryDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Generic BinaryDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • BitSystem BinaryDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • PositionalSystem BinaryDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • type Rep Binary = D1 ('MetaData "Binary" "Text.Printer.Integral" "text-printer-0.5.0.2-1bWqb3MFQIg8VOCQKIXP9Z" 'False) (C1 ('MetaCons "Binary" 'PrefixI 'False) U1)Defined in text-printer-0.5.0.2 · Text.Printer.Integral
datadata Octal
#

The octal numeral system.

Instances8Eq, Ord, Read, Show, Generic, BitSystem, …
  • Eq OctalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Ord OctalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Read OctalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Show OctalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Generic OctalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • BitSystem OctalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • PositionalSystem OctalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • type Rep Octal = D1 ('MetaData "Octal" "Text.Printer.Integral" "text-printer-0.5.0.2-1bWqb3MFQIg8VOCQKIXP9Z" 'False) (C1 ('MetaCons "Octal" 'PrefixI 'False) U1)Defined in text-printer-0.5.0.2 · Text.Printer.Integral
datadata Decimal
#

The decimal numeral system.

Instances7Eq, Ord, Read, Show, Generic, PositionalSystem, …
  • Eq DecimalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Ord DecimalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Read DecimalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Show DecimalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Generic DecimalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • PositionalSystem DecimalDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • type Rep Decimal = D1 ('MetaData "Decimal" "Text.Printer.Integral" "text-printer-0.5.0.2-1bWqb3MFQIg8VOCQKIXP9Z" 'False) (C1 ('MetaCons "Decimal" 'PrefixI 'False) U1)Defined in text-printer-0.5.0.2 · Text.Printer.Integral
datadata Hexadecimal
#

The hexadecimal numeral system.

Instances8Eq, Ord, Read, Show, Generic, BitSystem, …
datadata LowHex
#

The hexadecimal numeral system, using lower case digits.

Instances8Eq, Ord, Read, Show, Generic, BitSystem, …
  • Eq LowHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Ord LowHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Read LowHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Show LowHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Generic LowHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • BitSystem LowHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • PositionalSystem LowHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • type Rep LowHex = D1 ('MetaData "LowHex" "Text.Printer.Integral" "text-printer-0.5.0.2-1bWqb3MFQIg8VOCQKIXP9Z" 'False) (C1 ('MetaCons "LowHex" 'PrefixI 'False) U1)Defined in text-printer-0.5.0.2 · Text.Printer.Integral
datadata UpHex
#

The hexadecimal numeral system, using upper case digits.

Instances8Eq, Ord, Read, Show, Generic, BitSystem, …
  • Eq UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Ord UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Read UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Show UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • Generic UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • BitSystem UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • PositionalSystem UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral
  • type Rep UpHex = D1 ('MetaData "UpHex" "Text.Printer.Integral" "text-printer-0.5.0.2-1bWqb3MFQIg8VOCQKIXP9Z" 'False) (C1 ('MetaCons "UpHex" 'PrefixI 'False) U1)Defined in text-printer-0.5.0.2 · Text.Printer.Integral

Numeral printers

44 declarations
valuennLowHex :: (Integral α, Printer p) => α -> p
#

Print a non-negative number in the hexadecimal numeral system using lower case digits.

valuennUpHex :: (Integral α, Printer p) => α -> p
#

Print a non-negative number in the hexadecimal numeral system using upper case digits.

valuennBits :: (BitSystem s, Num α, Bits α, Printer p) => s -> α -> p
#

Print a non-negative binary number in the specified positional numeral system.

valuennLowHexBits :: (Num α, Bits α, Printer p) => α -> p
#

Print a non-negative binary number in the hexadecimal numeral system using lower case digits.

valuennUpHexBits :: (Num α, Bits α, Printer p) => α -> p
#

Print a non-negative binary number in the hexadecimal numeral system using upper case digits.

valuenpLowHex :: (Integral α, Printer p) => α -> p
#

Print a non-positive number in the hexadecimal numeral system using lower case digits.

valuenpUpHex :: (Integral α, Printer p) => α -> p
#

Print a non-positive number in the hexadecimal numeral system using upper case digits.

valuenpBits :: (BitSystem s, Ord α, Num α, Bits α, Printer p) => s -> α -> p
#

Print a non-positive two-compliment binary number in the specified positional numeral system. For example, npBits UpHex (-0xABC) would print "ABC".

valuenpLowHexBits :: (Ord α, Num α, Bits α, Printer p) => α -> p
#

Print a non-positive binary number in the hexadecimal numeral system using lower case digits.

valuenpUpHexBits :: (Ord α, Num α, Bits α, Printer p) => α -> p
#

Print a non-positive binary number in the hexadecimal numeral system using upper case digits.

valuenumber'
  1. :: (PositionalSystem s, Integral α, Printer p)
  2. => s
  3. -> p

    Prefix for negative values

  4. -> p

    Zero printer

  5. -> p

    Prefix for positive values

  6. -> α
  7. -> p
#

Print a number in the specified positional numeral system.

valuebinary'
  1. :: (Integral α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a number in the binary numeral system.

valuebinary :: (Integral α, Printer p) => α -> p
#

Print a number in the binary numeral system. Negative values are prefixed with a minus sign.

valueoctal'
  1. :: (Integral α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a number in the octal numeral system.

valueoctal :: (Integral α, Printer p) => α -> p
#

Print a number in the octal numeral system. Negative values are prefixed with a minus sign.

valuedecimal'
  1. :: (Integral α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a number in the decimal numeral system.

valuedecimal :: (Integral α, Printer p) => α -> p
#

Print a number in the decimal numeral system. Negative values are prefixed with a minus sign.

valuelowHex'
  1. :: (Integral α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a number in the hexadecimal numeral system using lower case digits.

valuelowHex :: (Integral α, Printer p) => α -> p
#

Print a number in the hexadecimal numeral system using lower case digits. Negative values are prefixed with a minus sign.

valueupHex'
  1. :: (Integral α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a number in the hexadecimal numeral system using upper case digits.

valueupHex :: (Integral α, Printer p) => α -> p
#

Print a number in the hexadecimal numeral system using upper case digits. Negative values are prefixed with a minus sign.

valuebits'
  1. :: (BitSystem s, Ord α, Num α, Bits α, Printer p)
  2. => s
  3. -> p

    Prefix for negative values

  4. -> p

    Zero printer

  5. -> p

    Prefix for positive values

  6. -> α
  7. -> p
#

Print a binary number in the specified positional numeral system.

valuebits :: (BitSystem s, Ord α, Num α, Bits α, Printer p) => s -> α -> p
#

Print a binary number in the specified positional numeral system. Negative values are prefixed with a minus sign.

valuebinaryBits'
  1. :: (Ord α, Num α, Bits α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a binary number in the binary numeral system.

valuebinaryBits :: (Ord α, Num α, Bits α, Printer p) => α -> p
#

Print a binary number in the binary numeral system. Negative values are prefixed with a minus sign.

valueoctalBits'
  1. :: (Ord α, Num α, Bits α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a binary number in the octal numeral system.

valueoctalBits :: (Ord α, Num α, Bits α, Printer p) => α -> p
#

Print a binary number in the octal numeral system. Negative values are prefixed with a minus sign.

valuelowHexBits'
  1. :: (Ord α, Num α, Bits α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a binary number in the hexadecimal numeral system using lower case digits.

valuelowHexBits :: (Ord α, Num α, Bits α, Printer p) => α -> p
#

Print a binary number in the hexadecimal numeral system using lower case digits. Negative values are prefixed with a minus sign.

valueupHexBits'
  1. :: (Ord α, Num α, Bits α, Printer p)
  2. => p

    Prefix for negative values

  3. -> p

    Zero printer

  4. -> p

    Prefix for positive values

  5. -> α
  6. -> p
#

Print a binary number in the hexadecimal numeral system using upper case digits.

valueupHexBits :: (Ord α, Num α, Bits α, Printer p) => α -> p
#

Print a binary number in the hexadecimal numeral system using upper case digits. Negative values are prefixed with a minus sign.