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


-- | A quasiquoter for raw string literals - that is, string literals that
--   don't recognise the standard escape sequences (such as <tt>'\n'</tt>).
--   Basically, they make your code more readable by freeing you from the
--   responsibility to escape backslashes. They are useful when working
--   with regular expressions, DOS/Windows paths and markup languages (such
--   as XML).
--   
--   See <tt>examples/RawRegex.hs</tt> for a usage example.
@package raw-strings-qq
@version 1.1


-- | Raw string literals, implemented using Template Haskell's
--   quasiquotation feature.
module Text.RawString.QQ

-- | A quasiquoter for raw string literals - that is, string literals that
--   don't recognise the standard escape sequences (such as <tt>'\n'</tt>).
--   Basically, they make your code more readable by freeing you from the
--   responsibility to escape backslashes. They are useful when working
--   with regular expressions, DOS/Windows paths and markup languages (such
--   as XML).
--   
--   Don't forget the <tt>LANGUAGE QuasiQuotes</tt> pragma if you're using
--   this module in your code.
--   
--   Usage:
--   
--   <pre>
--   ghci&gt; :set -XQuasiQuotes
--   ghci&gt; import Text.RawString.QQ
--   ghci&gt; let s = [r|\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}|]
--   ghci&gt; s
--   "\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,3}"
--   ghci&gt; [r|C:\Windows\SYSTEM|] ++ [r|\user32.dll|]
--   "C:\\Windows\\SYSTEM\\user32.dll"
--   </pre>
--   
--   Multiline raw string literals are also supported:
--   
--   <pre>
--   multiline :: String
--   multiline = [r|&lt;HTML&gt;
--   &lt;HEAD&gt;
--   &lt;TITLE&gt;Auto-generated html formated source&lt;/TITLE&gt;
--   &lt;META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"&gt;
--   &lt;/HEAD&gt;
--   &lt;BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff"&gt;
--   &lt;P&gt; &lt;/P&gt;
--   &lt;PRE&gt;|]
--   </pre>
--   
--   Caveat: since the <tt>"|]"</tt> character sequence is used to
--   terminate the quasiquotation, you can't use it inside the raw string
--   literal. Use <a>rQ</a> if you want to embed that character sequence
--   inside the raw string.
--   
--   For more on raw strings, see e.g.
--   <a>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2053.html</a>
--   
--   For more on quasiquotation, see
--   <a>http://www.haskell.org/haskellwiki/Quasiquotation</a>
r :: QuasiQuoter

-- | A variant of <a>r</a> that interprets the <tt>"|~]"</tt> sequence as
--   <tt>"|]"</tt>, <tt>"|~~]"</tt> as <tt>"|~]"</tt> and, in general,
--   <tt>"|~^n]"</tt> as <tt>"|~^(n-1)]"</tt> for n &gt;= 1.
--   
--   Usage:
--   
--   <pre>
--   ghci&gt; [rQ||~]|~]|]
--   "|]|]"
--   ghci&gt; [rQ||~~]|]
--   "|~]"
--   ghci&gt; [rQ||~~~~]|]
--   "|~~~]"
--   </pre>
rQ :: QuasiQuoter
