| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.Fmt.Code
Description
Numeric and binary encoding formatters.
All numeric encoders are polymorphic over IsString m,
so they work with any output type (String, Text.Builder,
ByteString.Builder, etc.).
Naming follows C printf conventions:
d,u,x— decimal signed, unsigned, hexhh,h,l,ll— width prefixes (8, 16, 32, 64 bit)- Primed variants (
hx',lx') — fixed-width (zero-padded)
Synopsis
- c :: IsString m => Fmt1 m s Char
- s :: (IsString m, Show a) => Fmt1 m s a
- e :: (IsString m, RealFloat a) => Int -> Fmt1 m s a
- f :: (IsString m, RealFloat a) => Int -> Fmt1 m s a
- g :: (IsString m, RealFloat a) => Int -> Fmt1 m s a
- d :: IsString m => Fmt1 m s Int
- hhd :: IsString m => Fmt1 m s Int8
- hd :: IsString m => Fmt1 m s Int16
- ld :: IsString m => Fmt1 m s Int32
- lld :: IsString m => Fmt1 m s Int64
- u :: IsString m => Fmt1 m s Word
- hhu :: IsString m => Fmt1 m s Word8
- hu :: IsString m => Fmt1 m s Word16
- lu :: IsString m => Fmt1 m s Word32
- llu :: IsString m => Fmt1 m s Word64
- x :: IsString m => Fmt1 m s Word
- hhx :: IsString m => Fmt1 m s Word8
- hhx' :: IsString m => Fmt1 m s Word8
- hx :: IsString m => Fmt1 m s Word16
- hx' :: IsString m => Fmt1 m s Word16
- lx :: IsString m => Fmt1 m s Word32
- lx' :: IsString m => Fmt1 m s Word32
- llx :: IsString m => Fmt1 m s Word64
- llx' :: IsString m => Fmt1 m s Word64
- c7 :: Fmt1 Builder s Char
- c8 :: Fmt1 Builder s Char
- s7 :: Fmt1 Builder s String
- s8 :: Fmt1 Builder s String
- b :: Fmt1 Builder s ByteString
- b' :: Fmt1 Builder s ByteString
- hhb :: Fmt1 Builder s Word8
- hb :: Fmt1 Builder s Word16
- hb' :: Fmt1 Builder s Word16
- lb :: Fmt1 Builder s Word32
- lb' :: Fmt1 Builder s Word32
- llb :: Fmt1 Builder s Word64
- llb' :: Fmt1 Builder s Word64
Generic (IsString m)
Floating point
e :: (IsString m, RealFloat a) => Int -> Fmt1 m s a Source #
Scientific notation with prec digits of precision.
f :: (IsString m, RealFloat a) => Int -> Fmt1 m s a Source #
Fixed-point notation with prec digits after the decimal.
Decimal encodings
Hexadecimal encodings
Character encodings (Builder-specific)
Binary encodings (Builder-specific)
b :: Fmt1 Builder s ByteString Source #
Embed a lazy ByteString.
b' :: Fmt1 Builder s ByteString Source #
Embed a strict ByteString.