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

module Data.String.Interpolate.IsString

-- | Like i, but constructs a value of type
--   
--   
--   IsString a => a
--   
i :: QuasiQuoter

module Data.String.Interpolate.Util

-- | Remove indentation as much as possible while preserving relative
--   indentation levels.
--   
--   unindent is useful in combination with i 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:
--   
--   
--   >>> :set -XQuasiQuotes
--   
--   >>> import Data.String.Interpolate
--   
--   >>> import Data.String.Interpolate.Util
--   
--   >>> :{
--    putStr $ unindent [i|
--        def foo
--          23
--        end
--      |]
--   :}
--   def foo
--     23
--   end
--   
--   
--   To allow this, two additional things are being done, apart from
--   removing indentation:
--   
--   
--   
- One empty line at the beginning will be removed and
--   
- if the last newline character ("\n") is followed by
--   spaces, the spaces are removed.
--   
unindent :: String -> String
