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


-- | String interpolation done right
--   
--   String interpolation done right
@package interpolate
@version 0.2.1

module Data.String.Interpolate

-- | A <a>QuasiQuoter</a> for string interpolation. Expression enclosed
--   within <tt>#{...}</tt> are interpolated, the result has to be in the
--   <a>Show</a> class.
--   
--   It interpolates strings
--   
--   <pre>
--   &gt;&gt;&gt; let name = "Marvin"
--   
--   &gt;&gt;&gt; putStrLn [i|name: #{name}|]
--   name: Marvin
--   </pre>
--   
--   or integers
--   
--   <pre>
--   &gt;&gt;&gt; let age = 23
--   
--   &gt;&gt;&gt; putStrLn [i|age: #{age}|]
--   age: 23
--   </pre>
--   
--   or arbitrary Haskell expressions
--   
--   <pre>
--   &gt;&gt;&gt; let profession = "\955-scientist"
--   
--   &gt;&gt;&gt; putStrLn [i|profession: #{unwords [name, "the", profession]}|]
--   profession: Marvin the λ-scientist
--   </pre>
i :: QuasiQuoter

module Data.String.Interpolate.IsString

-- | Like <a>i</a>, but constructs a value of type
--   
--   <pre>
--   IsString a =&gt; a
--   </pre>
i :: QuasiQuoter

module Data.String.Interpolate.Util

-- | Remove indentation as much as possible while preserving relative
--   indentation levels.
--   
--   <a>unindent</a> is useful in combination with <a>i</a> to remove
--   leading spaces that resulted from code indentation. That way you can
--   freely indent your string literals without the indentation ending up
--   in the resulting strings.
--   
--   Here is an example:
--   
--   <pre>
--   &gt;&gt;&gt; :set -XQuasiQuotes
--   
--   &gt;&gt;&gt; import Data.String.Interpolate
--   
--   &gt;&gt;&gt; import Data.String.Interpolate.Util
--   
--   &gt;&gt;&gt; :{
--    putStr $ unindent [i|
--        def foo
--          23
--        end
--      |]
--   :}
--   def foo
--     23
--   end
--   </pre>
--   
--   To allow this, two additional things are being done, apart from
--   removing indentation:
--   
--   <ul>
--   <li>One empty line at the beginning will be removed and</li>
--   <li>if the last newline character (<tt>"\n"</tt>) is followed by
--   spaces, the spaces are removed.</li>
--   </ul>
unindent :: String -> String
