| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Text.InterpolatedString.QM
- qm :: QuasiQuoter
- qn :: QuasiQuoter
- class ShowQ a where
Documentation
qm :: QuasiQuoter Source #
QuasiQuoter for multiline interpolated string.
[qm| foo {'b':'a':'r':""}
\ baz |] -- "foo bar baz"
Symbols that could be escaped:
\- backslash itself (two backslashes one by one:\\)[qm| foo\\bar |] -- "foo\\bar"- Space symbol at the edge
(to put it to the output instead of just ignoring it)
[qm| foo\ |] -- "foo "or[qm|\ foo |] -- " foo" - Line break
\n(actual line breaks are ignored) - Opening bracket of interpolation block
\{to prevent interpolatin and put it as it is[qm| {1+2} \{3+4} |] -- "3 {3+4}"
qn :: QuasiQuoter Source #
Works just like qm but without interpolation
(just multiline string with decorative indentation).
[qn| foo {'b':'a':'r':""}
\ baz |] -- "foo {'b':'a':'r':\"\"} baz"
Interpolation blocks goes just as text:
[qn| {1+2} \{3+4} |] -- "{1+2} \\{3+4}"