Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Internal module exporting utilities for making string interpolation quasiquoters
Synopsis
- data Transformation
- type Transformations = Set Transformation
- trim :: String -> String
- split :: (Char -> Bool) -> String -> [String]
- transformationsPowerSet :: [Transformations]
- generateName :: Transformations -> Name
- mkQuoter :: Transformations -> QuasiQuoter
- makeBuilder :: String -> Q Exp
- unescape :: String -> Q String
- unindent :: String -> String
- dropLeadingNewline :: String -> String
- splitTextLazy :: (Char -> Bool) -> Text -> NonEmpty Text
Documentation
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
type Transformations = Set Transformation Source #
A Set
of Transformation
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
dropLeadingNewline :: String -> String Source #