Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Builder
- run :: Builder -> Text
- length :: Builder -> Int
- null :: Builder -> Bool
- putToStdOut :: Builder -> IO ()
- putToStdErr :: Builder -> IO ()
- putLnToStdOut :: Builder -> IO ()
- putLnToStdErr :: Builder -> IO ()
- intercalate :: Foldable foldable => Builder -> foldable Builder -> Builder
- padFromLeft :: Int -> Char -> Builder -> Builder
- text :: Text -> Builder
- string :: String -> Builder
- asciiByteString :: ByteString -> Builder
- char :: Char -> Builder
- unicodeCodePoint :: Int -> Builder
- utf16CodeUnits1 :: Word16 -> Builder
- utf16CodeUnits2 :: Word16 -> Word16 -> Builder
- utf8CodeUnits1 :: Word8 -> Builder
- utf8CodeUnits2 :: Word8 -> Word8 -> Builder
- utf8CodeUnits3 :: Word8 -> Word8 -> Word8 -> Builder
- utf8CodeUnits4 :: Word8 -> Word8 -> Word8 -> Word8 -> Builder
- decimal :: Integral a => a -> Builder
- unsignedDecimal :: Integral a => a -> Builder
- thousandSeparatedDecimal :: Integral a => Char -> a -> Builder
- thousandSeparatedUnsignedDecimal :: Integral a => Char -> a -> Builder
- unsignedBinary :: Integral a => a -> Builder
- unsignedPaddedBinary :: (Integral a, FiniteBits a) => a -> Builder
- hexadecimal :: Integral a => a -> Builder
- unsignedHexadecimal :: Integral a => a -> Builder
- decimalDigit :: Integral a => a -> Builder
- hexadecimalDigit :: Integral a => a -> Builder
- fixedDouble :: Int -> Double -> Builder
- intervalInSeconds :: RealFrac seconds => seconds -> Builder
Documentation
Specification of how to efficiently construct strict Text
.
Provides instances of Semigroup
and Monoid
, which have complexity of O(1).
Accessors
Output IO
putToStdOut :: Builder -> IO () Source #
Put builder, to stdout
putToStdErr :: Builder -> IO () Source #
Put builder, to stderr
putLnToStdOut :: Builder -> IO () Source #
Put builder, followed by a line, to stdout
putLnToStdErr :: Builder -> IO () Source #
Put builder, followed by a line, to stderr
Constructors
Builder manipulators
intercalate :: Foldable foldable => Builder -> foldable Builder -> Builder Source #
Intercalate builders
padFromLeft :: Int -> Char -> Builder -> Builder Source #
Pad a builder from the left side to the specified length with the specified character
Textual
asciiByteString :: ByteString -> Builder Source #
ASCII byte string
Character
Low-level character
unicodeCodePoint :: Int -> Builder Source #
Unicode code point
utf16CodeUnits1 :: Word16 -> Builder Source #
Single code-unit UTF-16 character
utf8CodeUnits1 :: Word8 -> Builder Source #
Single code-unit UTF-8 character
utf8CodeUnits4 :: Word8 -> Word8 -> Word8 -> Word8 -> Builder Source #
UTF-8 character out of 4 code units
Integers
Decimal
unsignedDecimal :: Integral a => a -> Builder Source #
Decimal representation of an unsigned integral value
thousandSeparatedDecimal :: Integral a => Char -> a -> Builder Source #
Decimal representation of an integral value with thousands separated by the specified character
thousandSeparatedUnsignedDecimal :: Integral a => Char -> a -> Builder Source #
Decimal representation of an unsigned integral value with thousands separated by the specified character
Binary
unsignedBinary :: Integral a => a -> Builder Source #
Unsigned binary number
unsignedPaddedBinary :: (Integral a, FiniteBits a) => a -> Builder Source #
Unsigned binary number
Hexadecimal
hexadecimal :: Integral a => a -> Builder Source #
Hexadecimal representation of an integral value
unsignedHexadecimal :: Integral a => a -> Builder Source #
Unsigned hexadecimal representation of an integral value
Digits
decimalDigit :: Integral a => a -> Builder Source #
Decimal digit
hexadecimalDigit :: Integral a => a -> Builder Source #
Hexadecimal digit
Real
Double with a fixed number of decimal places.
Time
intervalInSeconds :: RealFrac seconds => seconds -> Builder Source #
Time interval in seconds.
Directly applicable to DiffTime
and NominalDiffTime
.