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


-- | HSX (Haskell Source with XML) allows literal XML syntax in Haskell source code.
--   
--   HSX (Haskell Source with XML) allows literal XML syntax in Haskell
--   source code. The hsx2hs preprocessor translates .hsx source files into
--   ordinary .hs files. Literal XML syntax is translated into function
--   calls for creating XML values of the appropriate forms. hsx2hs
--   transforms literal XML syntax into a series of function calls. Any
--   project can make use of the syntax by providing definitions for those
--   functions, and the XML values produced will be of the types specified.
--   This works for any types, since hsx2hs doesn't make any assumptions,
--   or inserts any information depending on types. XMLGenerator defines a
--   few typeclasses that together cover the functions injected by the
--   preprocessor. A project that uses these classes to provide the
--   semantics for the injected syntax will be able to use any functions
--   written in terms of these, allowing better code reusability than if
--   each project defines its own semantics for the XML syntax. Also, the
--   classes makes it possible to use the literal syntax at different types
--   within the same module. Achieving that is not as simple as it may
--   seem, but the XMLGenerator module provides all the necessary
--   machinery.
@package hsx2hs
@version 0.14.1.11


-- | Functions for transforming abstract Haskell code extended with regular
--   patterns into semantically equivalent normal abstract Haskell code. In
--   other words, we transform away regular patterns.
module Language.Haskell.HSX.Transform

-- | Transform away occurences of regular patterns from an abstract Haskell
--   module, preserving semantics.
transform :: Module () -> Module ()

-- | Transform expressions by traversing subterms. Of special interest are
--   expressions that contain patterns as subterms, i.e. <tt>let</tt>,
--   <tt>case</tt> and lambda expressions, and also list comprehensions and
--   <tt>do</tt>-expressions. All other expressions simply transform their
--   sub-expressions, if any. Of special interest are of course also any
--   xml expressions.
transformExp :: Exp () -> Exp ()
instance GHC.Base.Applicative Language.Haskell.HSX.Transform.Tr
instance GHC.Base.Monad Language.Haskell.HSX.Transform.Tr
instance GHC.Base.Functor Language.Haskell.HSX.Transform.Tr
instance GHC.Base.Applicative Language.Haskell.HSX.Transform.RN
instance GHC.Base.Monad Language.Haskell.HSX.Transform.RN
instance GHC.Base.Functor Language.Haskell.HSX.Transform.RN
instance GHC.Base.Applicative Language.Haskell.HSX.Transform.HsxM
instance GHC.Base.Monad Language.Haskell.HSX.Transform.HsxM
instance Control.Monad.Fail.MonadFail Language.Haskell.HSX.Transform.HsxM
instance GHC.Base.Functor Language.Haskell.HSX.Transform.HsxM


-- | this module provides a QuasiQuoter that supports the HSX syntax.
--   
--   <ul>
--   <li>- Module : Language.Haskell.HSX.Tranform</li>
--   <li>- Copyright : (c) Niklas Broberg 2004-2012</li>
--   <li>- License : BSD-style (see the file LICENSE.txt)</li>
--   <li>-</li>
--   <li>- Maintainer : Niklas Broberg, niklas.broberg@gmail.com</li>
--   <li>- Stability : experimental</li>
--   <li>- Portability : portable</li>
--   <li>-</li>
--   </ul>
--   
--   You will need to enable the QuasiQuotes extension for it to work,
--   which you can do by adding this to the top of your file:
--   
--   {-# LANGUAGE QuasiQuotes #-}
--   
--   Here is a simple example that generates an HTML fragment:
--   
--   <pre>
--   import Data.Char        (toUpper)
--   import HSX.QQ           (hsx)
--   import HSX.XMLGenerator
--   
--   html :: (XMLGenerator m) =&gt; XMLGenT m (XMLType m)
--   html = [hsx| &lt;p&gt;&lt;% map toUpper "hello, world!"  %&gt;&lt;/p&gt; |]
--   </pre>
--   
--   The syntax used by the hsx QuasiQuoter is the same as what is used by
--   <tt>trhsx</tt>. It is mostly normal XML syntax which a few key
--   differences:
--   
--   <ol>
--   <li>strings inside tags and attributes are automatically escaped --
--   you do not need to do &amp;lt;, etc.</li>
--   <li>The <a>%</a> syntax is used to embed the result of evaluating a
--   Haskell expression into the XML</li>
--   </ol>
--   
--   Values are embedde using the <tt>EmbedAsChild</tt> and
--   <tt>EmbedAsAttr</tt> classes. Additional instances can be added to
--   support application specific types.
module Language.Haskell.HSX.QQ

-- | QuasiQuoter which can be used to parse HSX syntax
hsx :: QuasiQuoter
