Positional numeral system.
Methods
systemName :: s -> StringThe name of the system (e.g. "binary", "decimal").
radixIn :: Num α => s -> αThe radix of the system.
isDigitIn :: s -> Char -> BoolTest if a character is a digit.
isNzDigitIn :: s -> Char -> BoolTest if a character is a non-zero digit.
fromDigitIn :: Num α => s -> Char -> Maybe αMap digits to the corresponding numbers. Return Nothing on other inputs.
fromNzDigitIn :: Num α => s -> Char -> Maybe αMap non-zero digits to the corresponding numbers. Return Nothing on other inputs.
unsafeFromDigitIn :: Num α => s -> Char -> αMap digits to the corresponding numbers. No checks are performed.
intToDigitIn :: s -> Int -> CharMap Int values to the corresponding digits. Inputs must be non-negative and less than the radix.
printDigitIn :: Printer p => s -> Char -> pPrint a digit.
printZeroIn :: Printer p => s -> p
Instances6PositionalSystem
PositionalSystem BinaryDefined in text-printer-0.5.0.2 · Text.Printer.IntegralPositionalSystem DecimalDefined in text-printer-0.5.0.2 · Text.Printer.IntegralPositionalSystem HexadecimalDefined in text-printer-0.5.0.2 · Text.Printer.IntegralPositionalSystem LowHexDefined in text-printer-0.5.0.2 · Text.Printer.IntegralPositionalSystem OctalDefined in text-printer-0.5.0.2 · Text.Printer.IntegralPositionalSystem UpHexDefined in text-printer-0.5.0.2 · Text.Printer.Integral