-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Template Haskell based support for format strings -- -- This package implements a Template Haskell quasi quoter for format -- strings. @package th-format @version 0.1.3.0 module Data.Format -- | Quasi Quoter for format strings. Examples: -- -- Examples: -- --
-- >>> let answer = 42 in [fmt|What is the answer to universe, life and everything? It's $answer!|] -- "What is the answer to universe, life and everything? It's 42!" ---- --
-- >>> let toggle = True in [fmt|The toggle is switched ${if toggle then ("on" :: Text) else "off"}|]
-- "The toggle is switched on"
--
--
--
-- >>> let timeDelta = 60 in [fmt|Request latency: ${timeDelta}ms|]
-- "Request latency: 60ms"
--
fmt :: QuasiQuoter
-- | This is just specialized mconcat, reexported under a
-- specialized name in order to avoid namespace clashes.
fmtConcat :: [Text] -> Text
-- | Type class which needs to be implemented by types that should be
-- usable for format string interpolation. For most types the this class
-- is simply implemented in terms of show. But for human-readable
-- strings (e.g. String, Text), the format representation
-- is simply the string itself, not its show-image (which adds
-- quotation characters).
class Format a
formatText :: Format a => a -> Text
instance GHC.Classes.Eq Data.Format.Fmt
instance GHC.Show.Show Data.Format.Fmt
instance Language.Haskell.TH.Syntax.Lift Data.Format.FmtString
instance Language.Haskell.TH.Syntax.Lift Data.Format.Fmt
instance Data.Format.Format GHC.Types.Int
instance Data.Format.Format GHC.Exception.Type.SomeException
instance Data.Format.Format GHC.Base.String
instance Data.Format.Format GHC.Types.Double
instance Data.Format.Format GHC.Types.Float
instance Data.Format.Format GHC.Integer.Type.Integer
instance Data.Format.Format Data.Text.Internal.Text
instance Data.Format.Format Data.Text.Internal.Lazy.Text
instance Data.Format.Format GHC.Types.Bool