-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Text formatting -- -- A text formatting library optimized for ease of use and high -- performance. @package text-format @version 0.1.0.0 -- | Types for text mangling. module Data.Text.Format.Types -- | Control the rendering of floating point numbers. data Format -- | Scientific notation (e.g. 2.3e123). Exponent :: Format -- | Standard decimal notation. Fixed :: Format -- | Use decimal notation for values between 0.1 and -- 9,999,999, and scientific notation otherwise. Generic :: Format -- | Render a floating point number using a much faster algorithm than the -- default (up to 10x faster). This performance comes with a potential -- cost in readability, as the faster algorithm can produce strings that -- are longer than the default algorithm (e.g. -- "1.3300000000000001" instead of "1.33"). newtype Fast a Fast :: a -> Fast a fromFast :: Fast a -> a -- | Use this newtype wrapper for your single parameter if you are -- formatting a string containing exactly one substitution site. newtype Only a Only :: a -> Only a fromOnly :: Only a -> a -- | Render a value using its Show instance. newtype Shown a Shown :: a -> Shown a shown :: Shown a -> a instance Enum Format instance Read Format instance Show Format instance Eq a => Eq (Fast a) instance Show a => Show (Fast a) instance Read a => Read (Fast a) instance Ord a => Ord (Fast a) instance Num a => Num (Fast a) instance Fractional a => Fractional (Fast a) instance Real a => Real (Fast a) instance RealFrac a => RealFrac (Fast a) instance Floating a => Floating (Fast a) instance RealFloat a => RealFloat (Fast a) instance Eq a => Eq (Only a) instance Show a => Show (Only a) instance Read a => Read (Only a) instance Ord a => Ord (Only a) instance Num a => Num (Only a) instance Fractional a => Fractional (Only a) instance Real a => Real (Only a) instance RealFrac a => RealFrac (Only a) instance Floating a => Floating (Only a) instance RealFloat a => RealFloat (Only a) instance Enum a => Enum (Only a) instance Integral a => Integral (Only a) instance Bounded a => Bounded (Only a) instance Eq a => Eq (Shown a) instance Show a => Show (Shown a) instance Read a => Read (Shown a) instance Ord a => Ord (Shown a) instance Num a => Num (Shown a) instance Fractional a => Fractional (Shown a) instance Real a => Real (Shown a) instance RealFrac a => RealFrac (Shown a) instance Floating a => Floating (Shown a) instance RealFloat a => RealFloat (Shown a) instance Enum a => Enum (Shown a) instance Integral a => Integral (Shown a) instance Bounded a => Bounded (Shown a) -- | Types that can be rendered to a Builder. module Data.Text.Buildable -- | The class of types that can be rendered to a Builder. class Buildable p build :: Buildable p => p -> Builder instance Buildable ZonedTime instance Buildable LocalTime instance Buildable TimeZone instance Buildable TimeOfDay instance Show a => Buildable (Shown a) instance Buildable Day instance Buildable UniversalTime instance Buildable UTCTime instance Buildable NominalDiffTime instance Buildable DiffTime instance Buildable (Fast Double) instance Buildable (Fast Float) instance Buildable Double instance Buildable Float instance (Integral a, Buildable a) => Buildable (Ratio a) instance Buildable Word64 instance Buildable Word instance Buildable Word32 instance Buildable Word16 instance Buildable Word8 instance Buildable Integer instance Buildable Int64 instance Buildable Int instance Buildable Int32 instance Buildable Int16 instance Buildable Int8 instance Buildable [Char] instance Buildable Char instance Buildable Text instance Buildable Text instance Buildable Builder -- | Types that can be used as a collection of arguments for formatting. module Data.Text.Format.Params -- | The class of types that can be used as a collection of arguments for -- formatting. class Params ps buildParams :: Params ps => ps -> [Builder] instance (Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f, Buildable g, Buildable h, Buildable i, Buildable j) => Params (a, b, c, d, e, f, g, h, i, j) instance (Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f, Buildable g, Buildable h, Buildable i) => Params (a, b, c, d, e, f, g, h, i) instance (Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f, Buildable g, Buildable h) => Params (a, b, c, d, e, f, g, h) instance (Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f, Buildable g) => Params (a, b, c, d, e, f, g) instance (Buildable a, Buildable b, Buildable c, Buildable d, Buildable e, Buildable f) => Params (a, b, c, d, e, f) instance (Buildable a, Buildable b, Buildable c, Buildable d, Buildable e) => Params (a, b, c, d, e) instance (Buildable a, Buildable b, Buildable c, Buildable d) => Params (a, b, c, d) instance (Buildable a, Buildable b, Buildable c) => Params (a, b, c) instance (Buildable a, Buildable b) => Params (a, b) instance Buildable a => Params [a] instance Buildable a => Params (Only a) -- | Fast, efficient, flexible support for formatting text strings. module Data.Text.Format -- | Use this newtype wrapper for your single parameter if you are -- formatting a string containing exactly one substitution site. newtype Only a Only :: a -> Only a fromOnly :: Only a -> a -- | Render a floating point number using a much faster algorithm than the -- default (up to 10x faster). This performance comes with a potential -- cost in readability, as the faster algorithm can produce strings that -- are longer than the default algorithm (e.g. -- "1.3300000000000001" instead of "1.33"). newtype Fast a Fast :: a -> Fast a fromFast :: Fast a -> a -- | Render a value using its Show instance. newtype Shown a Shown :: a -> Shown a shown :: Shown a -> a -- | Render a format string and arguments to a Text. format :: Params ps => Text -> ps -> Text -- | Render a format string and arguments, then print the result. print :: Params ps => Text -> ps -> IO () -- | Render a format string and arguments, then print the result to the -- given file handle. hprint :: Params ps => Handle -> Text -> ps -> IO () -- | Render a format string and arguments to a Builder. build :: Params ps => Text -> ps -> Builder -- | Pad the left hand side of a string until it reaches k -- characters wide, filling with character c. left :: Buildable a => Int -> Char -> a -> Builder -- | Pad the right hand side of a string until it reaches k -- characters wide, filling with character c. right :: Buildable a => Int -> Char -> a -> Builder