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


-- | Haskell string/text/bytestring interpolation that just works
--   
--   Unicode-aware string interpolation that handles all textual types.
--   
--   See the README at
--   <a>https://gitlab.com/williamyaoh/string-interpolate/blob/master/README.md</a>
--   for more info.
@package string-interpolate
@version 0.3.4.0

module Data.String.Interpolate.Conversion.ByteStringSink
instance Data.String.Interpolate.Conversion.Classes.InterpSink 'GHC.Types.True Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.InterpSink 'GHC.Types.True Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.InterpSink 'GHC.Types.True Data.ByteString.Builder.Internal.Builder
instance GHC.Show.Show src => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True src Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Types.Char Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Base.String Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Text Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Lazy.Text Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Builder.Builder Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Internal.Type.ByteString Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Lazy.Internal.ByteString Data.ByteString.Internal.Type.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Builder.Internal.Builder Data.ByteString.Internal.Type.ByteString
instance GHC.Show.Show src => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True src Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Types.Char Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Base.String Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Text Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Lazy.Text Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Builder.Builder Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Internal.Type.ByteString Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Lazy.Internal.ByteString Data.ByteString.Lazy.Internal.ByteString
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Builder.Internal.Builder Data.ByteString.Lazy.Internal.ByteString
instance GHC.Show.Show src => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True src Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Types.Char Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Base.String Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Text Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Lazy.Text Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Builder.Builder Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Internal.Type.ByteString Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Lazy.Internal.ByteString Data.ByteString.Builder.Internal.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Builder.Internal.Builder Data.ByteString.Builder.Internal.Builder

module Data.String.Interpolate.Conversion.TextSink
instance Data.String.Interpolate.Conversion.Classes.InterpSink 'GHC.Types.True Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.InterpSink 'GHC.Types.True Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.InterpSink 'GHC.Types.True Data.Text.Internal.Builder.Builder
instance GHC.Show.Show src => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True src Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Types.Char Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Base.String Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Text Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Lazy.Text Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Builder.Builder Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Internal.Type.ByteString Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Lazy.Internal.ByteString Data.Text.Internal.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Builder.Internal.Builder Data.Text.Internal.Text
instance GHC.Show.Show src => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True src Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Types.Char Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Base.String Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Text Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Lazy.Text Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Builder.Builder Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Internal.Type.ByteString Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Lazy.Internal.ByteString Data.Text.Internal.Lazy.Text
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Builder.Internal.Builder Data.Text.Internal.Lazy.Text
instance GHC.Show.Show src => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True src Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Types.Char Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True GHC.Base.String Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Text Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Lazy.Text Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.Text.Internal.Builder.Builder Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Internal.Type.ByteString Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Lazy.Internal.ByteString Data.Text.Internal.Builder.Builder
instance Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.True Data.ByteString.Builder.Internal.Builder Data.Text.Internal.Builder.Builder


module Data.String.Interpolate.Conversion

-- | Does this type require special behavior when something is interpolated
--   <i>into</i> it?
type family IsCustomSink dst

-- | Something that can be interpolated into.
class IsCustomSink dst ~ flag => InterpSink (flag :: Bool) dst where {
    type Builder flag dst :: Type;
}

-- | Meant to be used only for verbatim parts of the interpolation.
ofString :: InterpSink flag dst => Proxy flag -> String -> B dst (Builder flag dst)

-- | <a>build</a> should be 'in-order'; that is, the left builder comes
--   from a string on the left, and the right builder comes from a string
--   on the right.
build :: InterpSink flag dst => Proxy flag -> B dst (Builder flag dst) -> B dst (Builder flag dst) -> B dst (Builder flag dst)
finalize :: InterpSink flag dst => Proxy flag -> B dst (Builder flag dst) -> dst

-- | Represents that we can interpolate objects of type src into a an
--   interpolation string that returns type dst.
class InterpSink flag dst => Interpolatable (flag :: Bool) src dst
interpolate :: Interpolatable flag src dst => Proxy flag -> src -> B dst (Builder flag dst)

-- | Convert a strict ByteString into a Text <a>Builder</a>, converting any
--   invalid characters into the Unicode replacement character � (U+FFFD).
bsToTextBuilder :: ByteString -> Builder

-- | Convert a lazy ByteString into a Text <a>Builder</a>, converting any
--   invalid characters into the Unicode replacement character � (U+FFFD).
lbsToTextBuilder :: ByteString -> Builder

-- | <a>Data.ByteString.Builder</a> provides <tt>charUtf8</tt> to do this,
--   but it doesn't correctly handle invalid characters.
encodeCharUTF8 :: Char -> Builder

-- | Used to indicate to GHC that the value of all the proxy arguments is
--   the same.
proxyWrapper :: forall final flag. IsCustomSink final ~ flag => (Proxy flag -> final) -> final
instance (Data.String.Interpolate.Conversion.Classes.IsCustomSink str GHC.Types.~ 'GHC.Types.False, Data.String.IsString str) => Data.String.Interpolate.Conversion.Classes.InterpSink 'GHC.Types.False str
instance (GHC.Show.Show src, Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False src dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False GHC.Types.Char dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False GHC.Base.String dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False Data.Text.Internal.Text dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False Data.Text.Internal.Lazy.Text dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False Data.Text.Internal.Builder.Builder dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False Data.ByteString.Internal.Type.ByteString dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False Data.ByteString.Lazy.Internal.ByteString dst
instance (Data.String.IsString dst, Data.String.Interpolate.Conversion.Classes.IsCustomSink dst GHC.Types.~ 'GHC.Types.False) => Data.String.Interpolate.Conversion.Classes.Interpolatable 'GHC.Types.False Data.ByteString.Builder.Internal.Builder dst

module Data.String.Interpolate.Types
data InterpSegment
Expression :: String -> InterpSegment
Verbatim :: String -> InterpSegment
Spaces :: Int -> InterpSegment
Tabs :: Int -> InterpSegment
type Line = [InterpSegment]
type Lines = [Line]
instance GHC.Show.Show Data.String.Interpolate.Types.InterpSegment
instance GHC.Classes.Eq Data.String.Interpolate.Types.InterpSegment


-- | YOU SHOULD NOT USE THIS MODULE.
--   
--   This is exported mainly so tests can introspect on the implementation.
module Data.String.Interpolate.Parse

-- | Each section here is a list of lines.
--   
--   <a>Content</a> here is defined by the contiguous sequence of lines
--   begining with the first non-blank line and ending with the last
--   non-blank line
data ParseOutput
ParseOutput :: Lines -> Lines -> Lines -> ParseOutput
[poHeaderWS] :: ParseOutput -> Lines
[poContent] :: ParseOutput -> Lines
[poFooterWS] :: ParseOutput -> Lines

-- | Like <a>parseInterpSegments</a>, but for cases where we need to do
--   more complicated transformations on the input. Separates the
--   interpolation input into its content, whitespace header, and
--   whitespace footer.
parseInput :: String -> Either String ParseOutput

-- | Given the raw input from a quasiquote, parse it into the information
--   we need to output the actual expression.
--   
--   Returns an error message if parsing fails.
parseInterpSegments :: String -> Either String Lines
dosToUnix :: String -> String
instance GHC.Show.Show Data.String.Interpolate.Parse.ParseOutput
instance GHC.Classes.Eq Data.String.Interpolate.Parse.ParseOutput


-- | This module provides three quasiquoters, <a>i</a>, <a>__i</a>, and
--   <a>iii</a>, which:
--   
--   <ul>
--   <li>handle all of String/Text/ByteString, both strict and lazy</li>
--   <li>can interpolate <i>into</i> anything that implements
--   <tt>IsString</tt></li>
--   <li>can interpolate anything that implements <a>Show</a></li>
--   <li>are Unicode aware</li>
--   <li>are fast</li>
--   <li>handle multiline strings</li>
--   </ul>
--   
--   <a>i</a> leaves newlines and whitespace intact as they are in the
--   source code. <a>__i</a> strips leading indentation and surrounding
--   blank lines, while leaving linebreaks intact. <a>iii</a> collapses
--   newlines/whitespace into single spaces, putting all the output on a
--   single line.
--   
--   As an example,
--   
--   <pre>
--   {-# LANGUAGE OverloadedStrings #-}
--   {-# LANGUAGE QuasiQuotes #-}
--   
--   import Data.Text
--   import Data.String.Interpolate ( i )
--   
--   λ&gt; age = 33 :: Int
--   λ&gt; name = "Tatiana" :: Text
--   λ&gt; [i|{"name": "#{name}", "age": #{age}}|] :: String
--   &gt;&gt;&gt; "{\"name\": \"Tatiana\", \"age\": 33}"
--   
--   λ&gt; [i|
--   Name: #{name}
--   Age: #{age}
--   |] :: String
--   &gt;&gt;&gt; "\nName: Tatiana\nAge: 33\n"
--   </pre>
--   
--   There are also variants of <a>__i</a> and <a>iii</a> which have
--   different behavior for surrounding newlines.
--   
--   See the README at
--   <a>https://gitlab.com/williamyaoh/string-interpolate/blob/master/README.md</a>
--   for more details and examples.
module Data.String.Interpolate

-- | The basic, no-frills interpolator. Will interpolate anything you wrap
--   in <tt>#{}</tt>, and otherwise leaves what you write alone.
i :: QuasiQuoter

-- | An interpolator that handles indentation. Will interpolate anything
--   you wrap in <tt>#{}</tt>, remove leading indentation, and remove any
--   blank lines before and after the content.
--   
--   If the contained interpolation uses both tabs and spaces for
--   indentation, <tt>__i</tt> will assume the indentation type it finds in
--   the first nonblank line, ignoring indentation of the other type.
--   Please don't use mixed indentation.
--   
--   Note that only indentation you actually write in source code will be
--   stripped; <tt>__i</tt> does not touch any lines or whitespace inserted
--   by interpolations themselves.
--   
--   There is no extra performance penalty for using <tt>__i</tt>.
__i :: QuasiQuoter

-- | An interpolator that strips excess whitespace. Will collapse any
--   sequences of multiple spaces or whitespace into a single space,
--   putting the output onto a single line with surrounding whitespace
--   removed.
--   
--   Note that only whitespace you actually write in source code will be
--   collapsed; <tt>iii</tt> does not touch any lines or whitespace
--   inserted by interpolations themselves.
--   
--   There is no extra performance penalty for using <tt>iii</tt>.
iii :: QuasiQuoter

-- | Like <a>__i</a>, but leaves any surrounding newlines intact.
--   
--   The way to remember which is which is to look at the suffix character;
--   the multiple horizontal lines of the capital <tt>E</tt> suggests
--   multiple textual lines.
__i'E :: QuasiQuoter

-- | Like <a>__i</a>, but collapses any surrounding newlines into a single
--   newline.
--   
--   The way to remember which is which is to look at the suffix character;
--   the single horizontal line of the capital <tt>L</tt> suggests that it
--   leaves only a single newline.
__i'L :: QuasiQuoter

-- | Like <a>iii</a>, but leaves any surrounding newlines intact.
--   
--   The way to remember which is which is to look at the suffix character;
--   the multiple horizontal lines of the capital <tt>E</tt> suggests
--   multiple textual lines.
iii'E :: QuasiQuoter

-- | Like <a>iii</a>, but collapses any surrounding newlines into a single
--   newline.
--   
--   The way to remember which is which is to look at the suffix character;
--   the single horizontal line of the capital <tt>L</tt> suggests that it
--   leaves only a single newline.
iii'L :: QuasiQuoter
