-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Quasiquoter for neat and simple multiline text interpolation
--   
--   Quasiquoter for producing Text values with support for a simple
--   interpolation of input values. It removes the excessive indentation
--   from the input and accurately manages the indentation of all lines of
--   the interpolated variables.
@package neat-interpolation
@version 0.5.1.4


-- | NeatInterpolation provides a quasiquoter for producing strings with a
--   simple interpolation of input values. It removes the excessive
--   indentation from the input and accurately manages the indentation of
--   all lines of interpolated variables. But enough words, the code shows
--   it better.
--   
--   Consider the following declaration:
--   
--   <pre>
--   {-# LANGUAGE QuasiQuotes #-}
--   
--   import NeatInterpolation
--   import Data.Text (Text)
--   
--   f :: Text -&gt; Text -&gt; Text
--   f a b =
--     [trimming|
--       function(){
--         function(){
--           $a
--         }
--         return $b
--       }
--     |]
--   </pre>
--   
--   Executing the following:
--   
--   <pre>
--   main = Text.putStrLn $ f "1" "2"
--   </pre>
--   
--   will produce this (notice the reduced indentation compared to how it
--   was declared):
--   
--   <pre>
--   function(){
--     function(){
--       1
--     }
--     return 2
--   }
--   </pre>
--   
--   Now let's test it with multiline string parameters:
--   
--   <pre>
--   main = Text.putStrLn $ f
--     "{\n  indented line\n  indented line\n}"
--     "{\n  indented line\n  indented line\n}"
--   </pre>
--   
--   We get
--   
--   <pre>
--   function(){
--     function(){
--       {
--         indented line
--         indented line
--       }
--     }
--     return {
--       indented line
--       indented line
--     }
--   }
--   </pre>
--   
--   See how it neatly preserved the indentation levels of lines the
--   variable placeholders were at?
--   
--   If you need to separate variable placeholder from the following text
--   to prevent treating the rest of line as variable name, use escaped
--   variable:
--   
--   <pre>
--   f name = [trimming|this_could_be_${name}_long_identifier|]
--   </pre>
--   
--   So
--   
--   <pre>
--   f "one" == "this_could_be_one_long_identifier"
--   </pre>
--   
--   If you want to write something that looks like a variable but should
--   be inserted as-is, escape it with another <tt>$</tt>:
--   
--   <pre>
--   f word = [trimming|$$my ${word} $${string}|]
--   </pre>
--   
--   results in
--   
--   <pre>
--   f "funny" == "$my funny ${string}"
--   </pre>
module NeatInterpolation

-- | Trimmed quasiquoter variation. Same as <a>untrimming</a>, but also
--   removes the leading and trailing whitespace.
trimming :: QuasiQuoter

-- | Untrimmed quasiquoter variation. Unindents the quoted template and
--   converts tabs to spaces.
untrimming :: QuasiQuoter

-- | An alias to <a>trimming</a> for backward-compatibility.
text :: QuasiQuoter
