formatting-7.2.0: Combinator-based type-safe formatting (like printf() or FORMAT)

Safe Haskell | None
Language | Haskell2010

Formatting.Internal.Raw

Description

Reexports of things that were previously in the `text-format` package.

Synopsis

- left :: Buildable a => Int -> Char -> a -> Builder
- right :: Buildable a => Int -> Char -> a -> Builder
- fixed :: Real a => Int -> a -> Builder
- shortest :: Real a => a -> Builder
- hex :: Integral a => a -> Builder
- (<>) :: Builder -> Builder -> Builder
- i2d :: Int -> Char
- module Data.Text.Lazy.Builder.Int
- newtype Shown a = Shown {
  - shown :: a
  }
- newtype Hex a = Hex a

# Documentation

left :: Buildable a => Int -> Char -> a -> Builder Source #

Pad the left hand side of a string until it reaches `k` characters wide, if necessary filling with character `c`.

right :: Buildable a => Int -> Char -> a -> Builder Source #

Pad the right hand side of a string until it reaches `k` characters wide, if necessary filling with character `c`.

fixed Source #

Arguments

:: Real a |
=> Int | Number of digits of precision after the decimal.
-> a |
-> Builder |

Render a floating point number using normal notation, with the given number of decimal places.

shortest :: Real a => a -> Builder Source #

Render a floating point number using the smallest number of digits that correctly represent it.

hex :: Integral a => a -> Builder Source #

Render an integer using hexadecimal notation. (No leading "0x" is added.)

(<>) :: Builder -> Builder -> Builder infixr 4 Source #

The normal `mappend` function with right associativity instead of left.

i2d :: Int -> Char Source #

Unsafe conversion for decimal digits.

module Data.Text.Lazy.Builder.Int

newtype Shown a Source #

Render a value using its `Show` instance.

Constructors

Shown |

Fields

- shown :: a

#### Instances

Instances details

Show a => Buildable (Shown a) Source # |
Instance details Defined in Formatting.Buildable Methods build :: Shown a -> Builder Source #
Bounded a => Bounded (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods minBound :: Shown a Source # maxBound :: Shown a Source #
Enum a => Enum (Shown a) Source # |

Instance details

Defined in Data.Text.Format.Types

Methods

succ :: Shown a -> Shown a Source #

pred :: Shown a -> Shown a Source #

toEnum :: Int -> Shown a Source #

fromEnum :: Shown a -> Int Source #

enumFrom :: Shown a -> [Shown a] Source #

enumFromThen :: Shown a -> Shown a -> [Shown a] Source #

enumFromTo :: Shown a -> Shown a -> [Shown a] Source #

enumFromThenTo :: Shown a -> Shown a -> Shown a -> [Shown a] Source #

Floating a => Floating (Shown a) Source # |

Instance details

Defined in Data.Text.Format.Types

Methods

pi :: Shown a Source #

exp :: Shown a -> Shown a Source #

log :: Shown a -> Shown a Source #

sqrt :: Shown a -> Shown a Source #

(**) :: Shown a -> Shown a -> Shown a Source #

logBase :: Shown a -> Shown a -> Shown a Source #

sin :: Shown a -> Shown a Source #

cos :: Shown a -> Shown a Source #

tan :: Shown a -> Shown a Source #

asin :: Shown a -> Shown a Source #

acos :: Shown a -> Shown a Source #

atan :: Shown a -> Shown a Source #

sinh :: Shown a -> Shown a Source #

cosh :: Shown a -> Shown a Source #

tanh :: Shown a -> Shown a Source #

asinh :: Shown a -> Shown a Source #

acosh :: Shown a -> Shown a Source #

atanh :: Shown a -> Shown a Source #

log1p :: Shown a -> Shown a Source #

expm1 :: Shown a -> Shown a Source #

log1pexp :: Shown a -> Shown a Source #

log1mexp :: Shown a -> Shown a Source #

RealFloat a => RealFloat (Shown a) Source # |

Instance details

Defined in Data.Text.Format.Types

Methods

floatRadix :: Shown a -> Integer Source #

floatDigits :: Shown a -> Int Source #

floatRange :: Shown a -> (Int, Int) Source #

decodeFloat :: Shown a -> (Integer, Int) Source #

encodeFloat :: Integer -> Int -> Shown a Source #

exponent :: Shown a -> Int Source #

significand :: Shown a -> Shown a Source #

scaleFloat :: Int -> Shown a -> Shown a Source #

isNaN :: Shown a -> Bool Source #

isInfinite :: Shown a -> Bool Source #

isDenormalized :: Shown a -> Bool Source #

isNegativeZero :: Shown a -> Bool Source #

isIEEE :: Shown a -> Bool Source #

atan2 :: Shown a -> Shown a -> Shown a Source #

Num a => Num (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods (+) :: Shown a -> Shown a -> Shown a Source # (-) :: Shown a -> Shown a -> Shown a Source # (*) :: Shown a -> Shown a -> Shown a Source # negate :: Shown a -> Shown a Source # abs :: Shown a -> Shown a Source # signum :: Shown a -> Shown a Source # fromInteger :: Integer -> Shown a Source #
Read a => Read (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods readsPrec :: Int -> ReadS (Shown a) Source # readList :: ReadS [Shown a] Source # readPrec :: ReadPrec (Shown a) Source # readListPrec :: ReadPrec [Shown a] Source #
Fractional a => Fractional (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods (/) :: Shown a -> Shown a -> Shown a Source # recip :: Shown a -> Shown a Source # fromRational :: Rational -> Shown a Source #
Integral a => Integral (Shown a) Source # |

Instance details

Defined in Data.Text.Format.Types

Methods

quot :: Shown a -> Shown a -> Shown a Source #

rem :: Shown a -> Shown a -> Shown a Source #

div :: Shown a -> Shown a -> Shown a Source #

mod :: Shown a -> Shown a -> Shown a Source #

quotRem :: Shown a -> Shown a -> (Shown a, Shown a) Source #

divMod :: Shown a -> Shown a -> (Shown a, Shown a) Source #

toInteger :: Shown a -> Integer Source #

Real a => Real (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods toRational :: Shown a -> Rational Source #
RealFrac a => RealFrac (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods properFraction :: Integral b => Shown a -> (b, Shown a) Source # truncate :: Integral b => Shown a -> b Source # round :: Integral b => Shown a -> b Source # ceiling :: Integral b => Shown a -> b Source # floor :: Integral b => Shown a -> b Source #
Show a => Show (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods showsPrec :: Int -> Shown a -> ShowS Source # show :: Shown a -> String Source # showList :: [Shown a] -> ShowS Source #
Eq a => Eq (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods (==) :: Shown a -> Shown a -> Bool Source # (/=) :: Shown a -> Shown a -> Bool Source #
Ord a => Ord (Shown a) Source # |
Instance details Defined in Data.Text.Format.Types Methods compare :: Shown a -> Shown a -> Ordering Source # (<) :: Shown a -> Shown a -> Bool Source # (<=) :: Shown a -> Shown a -> Bool Source # (>) :: Shown a -> Shown a -> Bool Source # (>=) :: Shown a -> Shown a -> Bool Source # max :: Shown a -> Shown a -> Shown a Source # min :: Shown a -> Shown a -> Shown a Source #

newtype Hex a Source #

Render an integral type in hexadecimal.

Constructors

Hex a |

#### Instances

Instances details

Integral a => Buildable (Hex a) Source # |
Instance details Defined in Formatting.Buildable Methods build :: Hex a -> Builder Source #
Enum a => Enum (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods succ :: Hex a -> Hex a Source # pred :: Hex a -> Hex a Source # toEnum :: Int -> Hex a Source # fromEnum :: Hex a -> Int Source # enumFrom :: Hex a -> [Hex a] Source # enumFromThen :: Hex a -> Hex a -> [Hex a] Source # enumFromTo :: Hex a -> Hex a -> [Hex a] Source # enumFromThenTo :: Hex a -> Hex a -> Hex a -> [Hex a] Source #
Num a => Num (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods (+) :: Hex a -> Hex a -> Hex a Source # (-) :: Hex a -> Hex a -> Hex a Source # (*) :: Hex a -> Hex a -> Hex a Source # negate :: Hex a -> Hex a Source # abs :: Hex a -> Hex a Source # signum :: Hex a -> Hex a Source # fromInteger :: Integer -> Hex a Source #
Read a => Read (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods readsPrec :: Int -> ReadS (Hex a) Source # readList :: ReadS [Hex a] Source # readPrec :: ReadPrec (Hex a) Source # readListPrec :: ReadPrec [Hex a] Source #
Integral a => Integral (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods quot :: Hex a -> Hex a -> Hex a Source # rem :: Hex a -> Hex a -> Hex a Source # div :: Hex a -> Hex a -> Hex a Source # mod :: Hex a -> Hex a -> Hex a Source # quotRem :: Hex a -> Hex a -> (Hex a, Hex a) Source # divMod :: Hex a -> Hex a -> (Hex a, Hex a) Source # toInteger :: Hex a -> Integer Source #
Real a => Real (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods toRational :: Hex a -> Rational Source #
Show a => Show (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods showsPrec :: Int -> Hex a -> ShowS Source # show :: Hex a -> String Source # showList :: [Hex a] -> ShowS Source #
Eq a => Eq (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods (==) :: Hex a -> Hex a -> Bool Source # (/=) :: Hex a -> Hex a -> Bool Source #
Ord a => Ord (Hex a) Source # |
Instance details Defined in Data.Text.Format.Types Methods compare :: Hex a -> Hex a -> Ordering Source # (<) :: Hex a -> Hex a -> Bool Source # (<=) :: Hex a -> Hex a -> Bool Source # (>) :: Hex a -> Hex a -> Bool Source # (>=) :: Hex a -> Hex a -> Bool Source # max :: Hex a -> Hex a -> Hex a Source # min :: Hex a -> Hex a -> Hex a Source #