Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Producing TH splices for interpolation.
Documentation
intSplice :: InterpolatorOptions -> (SwitchesOptions, InterpolatedString) -> ExpQ Source #
Build interpolated string into TH splice.
simpleValueInterpolator :: ValueInterpolator Source #
Interpolates only strings containing single variable.
This allows for {var}
-like interpolated values, no applications,
operators or other constructions are allowed.
tickedValueInterpolator :: ValueInterpolator Source #
This is a variation of simpleValueInterpolator
that requires all the
referred variables to start from a special i'
prefix.
One major issue with simpleValueInterpolator
is that, with it the user can
mistakenly pick a value from the wrong scope, for instance, a global value
instead of a local one.
This value interpolator tries to solve the issue by bringing the practice
to call the interpolator like
let renderedText = let i'value1 = ... i'value2 = ... in [int||Values are {value1} and {value2}]
and so interpolating only local declarations.
simpleInvisibleCharsPreview :: InvisibleCharsPreview Source #
Marks the most common space-like characters.