Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Internal module exporting utilities for making string interpolation quasiquoters
Synopsis
- type Transformations = Set Transformation
- data Transformation
- transformationsPowerSet :: [Transformations]
- generateName :: Transformations -> Name
- mkQuoter :: Transformations -> QuasiQuoter
- unescape :: String -> Q String
- makeBuilder :: String -> Q Exp
- indentF'' :: Int -> Builder -> Builder
- splitTextLazy :: (Char -> Bool) -> Text -> NonEmpty Text
- dropLeadingNewline :: String -> String
- unindent :: String -> String
- split :: (Char -> Bool) -> String -> [String]
- trim :: String -> String
Documentation
type Transformations = Set Transformation Source #
A Set
of Transformation
data Transformation Source #
Datatype encoding transformations we apply to a quoter input and output. Note the order is important! We first unescape, then unindent, then trim.
Instances
transformationsPowerSet :: [Transformations] Source #
Used to generate quasi-quoters
generateName :: Transformations -> Name Source #
Generate TH Name
for a quoter based on a set of transformations
mkQuoter :: Transformations -> QuasiQuoter Source #
Make a QuasiQuoter
using a given set of transformaions
indentF'' :: Int -> Builder -> Builder Source #
A version of Fmt.indentF'
that doesn't indent the first line, and keeps the final line break
intact.
dropLeadingNewline :: String -> String Source #