HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduledata-textual-0.3.0.3Haskell2010

Data.Textual.Integral

Parsers for integral numbers written in positional numeral systems.

Contents
  1. Positional numeral systems
  2. Single digits
  3. Numbers
Synopsis

Positional numeral systems

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-8cUAwqiswVPATcJ4CuGnx5" '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-8cUAwqiswVPATcJ4CuGnx5" '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-8cUAwqiswVPATcJ4CuGnx5" '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-8cUAwqiswVPATcJ4CuGnx5" '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-8cUAwqiswVPATcJ4CuGnx5" 'False) (C1 ('MetaCons "UpHex" 'PrefixI 'False) U1)Defined in text-printer-0.5.0.2 · Text.Printer.Integral

Single digits

Numbers

valuenpcBits :: (BitSystem s, Num α, Bits α, Monad μ, CharParsing μ) => s -> μ α

Parse a non-positive two's complement binary number written in the specified positional numeral system. Leading zeroes are not allowed.

datadata Sign

Sign of a number.

Instances3Eq, Read, Show
  • Eq SignDefined in data-textual-0.3.0.3 · Data.Textual.Integral
  • Read SignDefined in data-textual-0.3.0.3 · Data.Textual.Integral
  • Show SignDefined in data-textual-0.3.0.3 · Data.Textual.Integral
valuebits'
  1. :: (BitSystem s, Num α, Bits α, Monad μ, CharParsing μ)
  2. => μ Sign
  3. -> s
  4. -> μ α

Parse a (two's complement) binary number written in the specified positional numeral system. The supplied parser is used to determine the sign of the number.

valuecBits'
  1. :: (BitSystem s, Num α, Bits α, Monad μ, CharParsing μ)
  2. => μ Sign
  3. -> s
  4. -> μ α

Parse a (two's complement) binary number written in the specified positional numeral system. The supplied parser is used to determine the sign of the number. Leading zeroes are not allowed.

valuebitsUpTo'
  1. :: (BitSystem s, Num α, Bits α, Monad μ, CharParsing μ)
  2. => μ Sign
  3. -> s
  4. -> Int
  5. -> μ α

Parse a (two's complement) binary number written in the specified positional numeral system (up to n digits). The supplied parser is used to determine the sign of the number.

valuecBitsUpTo'
  1. :: (BitSystem s, Num α, Bits α, Monad μ, CharParsing μ)
  2. => μ Sign
  3. -> s
  4. -> Int
  5. -> μ α

Parse a (two's complement) binary number written in the specified positional numeral system (up to n digits). The supplied parser is used to determine the sign of the number. Leading zeroes are not allowed.

valuebBits'
  1. :: (BitSystem s, Ord α, Bounded α, Num α, Bits α, Monad μ, CharParsing μ)
  2. => μ Sign
  3. -> s
  4. -> μ α

Parse a (two's complement) binary number written in the specified positional numeral system, failing on overflow. The supplied parser is used to determine the sign of the number.

valuecbBits'
  1. :: (BitSystem s, Ord α, Bounded α, Num α, Bits α, Monad μ, CharParsing μ)
  2. => μ Sign
  3. -> s
  4. -> μ α

Parse a (two's complement) binary number written in the specified positional numeral system, failing on overflow. The supplied parser is used to determine the sign of the number. Leading zeroes are not allowed.