Safe Haskell | None |
---|---|
Language | Haskell2010 |
Convenience quasiquoter to ease the pain working with multiline strings
Documentation
A handy quasiquoter to work with the multiline file contents
Strips the longest common leading spaces segment. All spacey characters are treated equally. The first line is ignored if it's spaces only.
>>>
:{
putStr [dedent| hello world ! |] :} hello world !
dedentSubst :: QuasiQuoter Source
dedent
with variable substitution
>>>
let hello = "bye" :: String
>>>
:{
putStr [dedentSubst| #{hello} world ! |] :} bye world !