text-show-2.1.1: Efficient conversion of values into Text

Copyright | (C) 2014-2015 Ryan Scott
License | BSD-style (see the file LICENSE)
Maintainer | Ryan Scott
Stability | Provisional
Portability | GHC
Safe Haskell | None
Language | Haskell2010

TextShow.Data.Integral

Description

Monomorphic `TextShow` functions for integral types.

Since: 2

Synopsis

- showbIntPrec :: Int -> Int -> Builder
- showbInt8Prec :: Int -> Int8 -> Builder
- showbInt16Prec :: Int -> Int16 -> Builder
- showbInt32Prec :: Int -> Int32 -> Builder
- showbInt64Prec :: Int -> Int64 -> Builder
- showbIntegerPrec :: Int -> Integer -> Builder
- showbIntegralPrec :: Integral a => Int -> a -> Builder
- showbIntAtBase :: (Integral a, TextShow a) => a -> (Int -> Char) -> a -> Builder
- showbBin :: (Integral a, TextShow a) => a -> Builder
- showbHex :: (Integral a, TextShow a) => a -> Builder
- showbOct :: (Integral a, TextShow a) => a -> Builder
- showbWord :: Word -> Builder
- showbWord8 :: Word8 -> Builder
- showbWord16 :: Word16 -> Builder
- showbWord32 :: Word32 -> Builder
- showbWord64 :: Word64 -> Builder

# Documentation

showbIntPrec :: Int -> Int -> Builder Source

Convert an `Int` to a `Builder` with the given precedence.

Since: 2

showbInt8Prec :: Int -> Int8 -> Builder Source

Convert an `Int8` to a `Builder` with the given precedence.

Since: 2

showbInt16Prec :: Int -> Int16 -> Builder Source

Convert an `Int16` to a `Builder` with the given precedence.

Since: 2

showbInt32Prec :: Int -> Int32 -> Builder Source

Convert an `Int32` to a `Builder` with the given precedence.

Since: 2

showbInt64Prec :: Int -> Int64 -> Builder Source

Convert an `Int64` to a `Builder` with the given precedence.

Since: 2

showbIntegerPrec :: Int -> Integer -> Builder Source

Convert an `Integer` to a `Builder` with the given precedence.

Since: 2

showbIntegralPrec :: Integral a => Int -> a -> Builder Source

Convert an `Integral` type to a `Builder` with the given precedence.

Since: 2

showbIntAtBase :: (Integral a, TextShow a) => a -> (Int -> Char) -> a -> Builder Source

Shows a non-negative `Integral` number using the base specified by the first argument, and the character representation specified by the second.

Since: 2

showbBin :: (Integral a, TextShow a) => a -> Builder Source

Show non-negative `Integral` numbers in base 2.

Since: 2

showbHex :: (Integral a, TextShow a) => a -> Builder Source

Show non-negative `Integral` numbers in base 16.

Since: 2

showbOct :: (Integral a, TextShow a) => a -> Builder Source

Show non-negative `Integral` numbers in base 8.

Since: 2

showbWord :: Word -> Builder Source

Convert a `Word` to a `Builder` with the given precedence.

Since: 2

showbWord8 :: Word8 -> Builder Source

Convert a `Word8` to a `Builder` with the given precedence.

Since: 2

showbWord16 :: Word16 -> Builder Source

Convert a `Word16` to a `Builder` with the given precedence.

Since: 2

showbWord32 :: Word32 -> Builder Source

Convert a `Word32` to a `Builder` with the given precedence.

Since: 2

showbWord64 :: Word64 -> Builder Source

Convert a `Word64` to a `Builder` with the given precedence.

Since: 2