Hoogle Search
Within LTS Haskell 24.35 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
formatNumber :: Text -> Int -> Texttypst Typst.Methods No documentation available.
format :: FormatType r => Format -> rvformat Text.Format Format a variable number of arguments with Python-style format string
>>> format "{:s}, {:d}, {:.4f}" "hello" 123 pi "hello, 123, 3.1416" >>> format "{1:s}, {0:d}, {2:.4f}" 123 "hello" pi "hello, 123, 3.1416" >>> format "{:s} {:d} {pi:.4f}" "hello" 123 ("pi" := pi) "hello, 123, 3.1416"See Format to learn more about format string syntax. See FormatArg to learn how to derive FormatArg for your own data types.format1 :: FormatArg a => Format1 -> a -> Stringvformat Text.Format A variant of format, it takes only one positional argument
>>> :set -XDeriveGeneric >>> import GHC.Generics >>> data Triple = Triple String Int Double deriving Generic >>> instance FormatArg Triple >>> format "{0!0:s} {0!1:d} {0!2:.4f}" $ Triple "hello" 123 pi "hello, 123, 3.1416" >>> format1 "{0:s} {1:d} {2:.4f}" $ Triple "hello" 123 pi "hello, 123, 3.1416"formatArg :: FormatArg a => a -> Formattervformat Text.Format No documentation available.
formatChar :: Char -> Formattervformat Text.Format Formatter for Char values
formatInt :: (Integral a, Bounded a) => a -> Formattervformat Text.Format Formatter for Int values
formatInteger :: Integer -> Formattervformat Text.Format Formatter for Integer values
formatRealFloat :: RealFloat a => a -> Formattervformat Text.Format Formatter for RealFloat values
formatString :: String -> Formattervformat Text.Format Formatter for string values
formatWord :: (Integral a, Bounded a) => a -> Formattervformat Text.Format Formatter for Word values