PyF-0.6.1.0: Quasiquotations for a python like interpolated string formater

Safe HaskellNone
LanguageHaskell2010

PyF

Contents

Description

A lot of quasiquoters to format and interpolate string expression

Synopsis

Documentation

f :: QuasiQuoter Source #

Returns an expression usable with Formatting.format (and similar functions)

f' :: QuasiQuoter Source #

Generic formatter, can format an expression to (lazy) Text, String, Builder and IO () depending on type inference

With custom delimiters

fIOWithDelimiters :: (Char, Char) -> QuasiQuoter Source #

Format the format string and directly print it to stdout

fStringWithDelimiters :: (Char, Char) -> QuasiQuoter Source #

Format the format string as a String

fBuilderWithDelimiters :: (Char, Char) -> QuasiQuoter Source #

Format the format string as a Builder

fLazyTextWithDelimiters :: (Char, Char) -> QuasiQuoter Source #

Format the format string as a Lazy Text

fStrictTextWithDelimiters :: (Char, Char) -> QuasiQuoter Source #

Format the format string as a strict Text

Formatting re-export

runFormat :: Format r a -> (Builder -> r) -> a #

format :: Format Text a -> a #

Run the formatter and return a lazy Text value.

sformat :: Format Text a -> a #

Run the formatter and return a strict Text value.

bprint :: Format Builder a -> a #

Run the formatter and return a Builder value.

fprint :: Format (IO ()) a -> a #

Run the formatter and print out the text to stdout.

hprint :: Handle -> Format (IO ()) a -> a #

Run the formatter and put the output onto the given Handle.