HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletext-printer-0.5.0.2Haskell2010

Text.Printer.Fractional

Print fractions.

  • 7 types
  • 2 classes
  • 4 values

Positional numeral 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

Optionality characteristic

3 declarations
datadata Optional
#

Optionality characteristic.

Instances9Bounded, Enum, Eq, Ord, Read, Show, …

Fraction printers

2 declarations
valuefraction'
  1. :: (PositionalSystem s, Real α, Printer p)
  2. => s
  3. -> p

    Prefix for negative values

  4. -> p

    Zero printer

  5. -> p

    Prefix for positive values

  6. -> p

    Numerator/denominator separator

  7. -> Optional

    Whether to print invisible denominators

  8. -> α
  9. -> p
#

Print a fraction, writing the numerator and the denominator in the specified positional numeral system.

valuefraction :: (Real α, Printer p) => α -> p
#

Print a fraction. The numerator and the denominator are written in the decimal numeral system and separated by a slash. Negative values are prefixed with a minus sign. Invisible denominators are omitted.