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


-- | Haml-like template files that are compile-time checked
--   
--   Hamlet gives you a type-safe tool for generating HTML code. It works
--   via Quasi-Quoting, and generating extremely efficient output code. The
--   syntax is white-space sensitive, and it helps you avoid cross-site
--   scripting issues and 404 errors. Please see the documentation at
--   <a>http://www.yesodweb.com/book/shakespearean-templates</a> for more
--   details.
--   
--   Here is a quick overview of hamlet html. Due to haddock escaping
--   issues, we can't properly show variable insertion, but we are still
--   going to show some conditionals. Please see
--   <a>http://www.yesodweb.com/book/shakespearean-templates</a> for a
--   thorough description
--   
--   <pre>
--   !!!
--   &lt;html&gt;
--       &lt;head&gt;
--           &lt;title&gt;Hamlet Demo
--       &lt;body&gt;
--           &lt;h1&gt;Information on John Doe
--           &lt;h2&gt;
--               $if isMarried person
--                   Married
--               $else
--                   Not married
--   </pre>
@package hamlet
@version 1.1.1


-- | Most everything exported here is exported also by <a>Text.Hamlet</a>.
--   The exceptions to that rule should not be necessary for normal usage.
module Text.Hamlet.RT
newtype HamletRT
HamletRT :: [SimpleDoc] -> HamletRT
data HamletData url
HDHtml :: Html -> HamletData url
HDUrl :: url -> HamletData url
HDUrlParams :: url -> [(Text, Text)] -> HamletData url
HDTemplate :: HamletRT -> HamletData url
HDBool :: Bool -> HamletData url
HDMaybe :: (Maybe (HamletMap url)) -> HamletData url
HDList :: [HamletMap url] -> HamletData url
type HamletMap url = [([String], HamletData url)]
data HamletException
HamletParseException :: String -> HamletException
HamletUnsupportedDocException :: Doc -> HamletException
HamletRenderException :: String -> HamletException
parseHamletRT :: Failure HamletException m => HamletSettings -> String -> m HamletRT
renderHamletRT :: Failure HamletException m => HamletRT -> HamletMap url -> (url -> [(Text, Text)] -> Text) -> m Html
renderHamletRT' :: Failure HamletException m => Bool -> HamletRT -> HamletMap url -> (url -> [(Text, Text)] -> Text) -> m Html
data SimpleDoc
SDRaw :: String -> SimpleDoc
SDVar :: [String] -> SimpleDoc
SDUrl :: Bool -> [String] -> SimpleDoc
SDTemplate :: [String] -> SimpleDoc
SDForall :: [String] -> String -> [SimpleDoc] -> SimpleDoc
SDMaybe :: [String] -> String -> [SimpleDoc] -> [SimpleDoc] -> SimpleDoc
SDCond :: [([String], [SimpleDoc])] -> [SimpleDoc] -> SimpleDoc
instance Typeable HamletException
instance Show HamletException
instance Exception HamletException

module Text.Hamlet
type Html = Markup
shamlet :: QuasiQuoter
shamletFile :: FilePath -> Q Exp
xshamlet :: QuasiQuoter
xshamletFile :: FilePath -> Q Exp

-- | A function generating an <a>Html</a> given a URL-rendering function.
type HtmlUrl url = Render url -> Html
hamlet :: QuasiQuoter
hamletFile :: FilePath -> Q Exp
xhamlet :: QuasiQuoter
xhamletFile :: FilePath -> Q Exp

-- | A function generating an <a>Html</a> given a message translator and a
--   URL rendering function.
type HtmlUrlI18n msg url = Translate msg -> Render url -> Html
ihamlet :: QuasiQuoter
ihamletFile :: FilePath -> Q Exp

-- | Convert some value to a list of attribute pairs.
class ToAttributes a
toAttributes :: ToAttributes a => a -> [(Text, Text)]

-- | Settings for parsing of a hamlet document.
data HamletSettings
HamletSettings :: String -> NewlineStyle -> (String -> CloseStyle) -> [(String, String)] -> HamletSettings

-- | The value to replace a "!!!" with. Do not include the trailing
--   newline.
hamletDoctype :: HamletSettings -> String

-- | Should we add newlines to the output, making it more human-readable?
--   Useful for client-side debugging but may alter browser page layout.
hamletNewlines :: HamletSettings -> NewlineStyle

-- | How a tag should be closed. Use this to switch between HTML, XHTML or
--   even XML output.
hamletCloseStyle :: HamletSettings -> String -> CloseStyle

-- | Mapping from short names in "$doctype" statements to full doctype.
hamletDoctypeNames :: HamletSettings -> [(String, String)]
data NewlineStyle

-- | never add newlines
NoNewlines :: NewlineStyle

-- | add newlines between consecutive text lines
NewlinesText :: NewlineStyle

-- | add newlines everywhere
AlwaysNewlines :: NewlineStyle
DefaultNewlineStyle :: NewlineStyle
hamletWithSettings :: Q HamletRules -> HamletSettings -> QuasiQuoter
hamletFileWithSettings :: Q HamletRules -> HamletSettings -> FilePath -> Q Exp

-- | Defaults settings: HTML5 doctype and HTML-style empty tags.
defaultHamletSettings :: HamletSettings
xhtmlHamletSettings :: HamletSettings
data Env
Env :: Maybe ((Exp -> Q Exp) -> Q Exp) -> Maybe ((Exp -> Q Exp) -> Q Exp) -> Env
urlRender :: Env -> Maybe ((Exp -> Q Exp) -> Q Exp)
msgRender :: Env -> Maybe ((Exp -> Q Exp) -> Q Exp)
data HamletRules
HamletRules :: Exp -> ((Env -> Q Exp) -> Q Exp) -> (Env -> Exp -> Q Exp) -> HamletRules
hrFromHtml :: HamletRules -> Exp
hrWithEnv :: HamletRules -> (Env -> Q Exp) -> Q Exp
hrEmbed :: HamletRules -> Env -> Exp -> Q Exp
hamletRules :: Q HamletRules
ihamletRules :: Q HamletRules
htmlRules :: Q HamletRules
instance ToAttributes [(String, String)]
instance ToAttributes [(Text, Text)]
instance ToAttributes (String, String)
instance ToAttributes (Text, Text)
