-- 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 -- http://www.yesodweb.com/book/shakespearean-templates 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 -- http://www.yesodweb.com/book/shakespearean-templates for a -- thorough description -- --
--   !!!
--   <html>
--       <head>
--           <title>Hamlet Demo
--       <body>
--           <h1>Information on John Doe
--           <h2>
--               $if isMarried person
--                   Married
--               $else
--                   Not married
--   
@package hamlet @version 1.1.3.1 -- | Most everything exported here is exported also by Text.Hamlet. -- 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 Html 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 Html 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 data CloseStyle NoClose :: CloseStyle CloseInside :: CloseStyle CloseSeparate :: CloseStyle instance ToAttributes [(String, String)] instance ToAttributes [(Text, Text)] instance ToAttributes (String, String) instance ToAttributes (Text, Text)