category-printf-0.1.1.0: Highbrow approach to type-safe printf format specifications.

Safe HaskellSafe
LanguageHaskell2010

Control.Category.Printf.Text.Lazy

Synopsis

Documentation

printf :: Format Text (IO ()) b -> b Source

printfLn :: Format Text (IO ()) b -> b Source

hPrintf :: Handle -> Format Text (IO ()) b -> b Source

hPrintfLn :: Handle -> Format Text (IO ()) b -> b Source

padLeft :: Text -> Int64 -> Format Text a b -> Format Text a b Source

padLeft s n f will transform the formatter f, ensuring that the output produced is at least length n by appending sufficiently many copies of s on the left. The string s should have length at least 1, otherwise this has no effect. In cases where s has length greater than 1, the last occurrence of s will be truncated as necessary to fit the necessary width.

padRight :: Text -> Int64 -> Format Text a b -> Format Text a b Source

padRight s n f will transform the formatter f, ensuring that the output produced is at least length n by appending sufficiently many copies of s on the right. The string s should have length at least 1, otherwise this has no effect. In cases where s has length greater than 1, the last occurrence of s will be truncated as necessary to fit the necessary width.