-- 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://docs.yesodweb.com/book/hamlet/ 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:docs.yesodweb.combooktemplates 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 0.7.3 module Text.Cassius type Cassius url = (url -> [(String, String)] -> String) -> Css type Css = [Css'] class ToCss a toCss :: ToCss a => a -> Text renderCassius :: (url -> [(String, String)] -> String) -> Cassius url -> Text renderCss :: Css -> Text cassius :: QuasiQuoter cassiusFile :: FilePath -> Q Exp cassiusFileDebug :: FilePath -> Q Exp data Color Color :: Word8 -> Word8 -> Word8 -> Color colorRed :: Color colorBlack :: Color -- | Create a CSS size, e.g. $(mkSize 100px). mkSize :: String -> ExpQ -- | Absolute size units. data AbsoluteUnit Centimeter :: AbsoluteUnit Inch :: AbsoluteUnit Millimeter :: AbsoluteUnit Pica :: AbsoluteUnit Point :: AbsoluteUnit -- | Not intended for direct use, see mkSize. data AbsoluteSize AbsoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize -- | Units used for text formatting. absoluteSizeUnit :: AbsoluteSize -> AbsoluteUnit -- | Normalized value in centimeters. absoluteSizeValue :: AbsoluteSize -> Rational -- | Constructs AbsoluteSize. Not intended for direct use, see -- mkSize. absoluteSize :: AbsoluteUnit -> Rational -> AbsoluteSize data EmSize EmSize :: Rational -> EmSize data ExSize ExSize :: Rational -> ExSize -- | Not intended for direct use, see mkSize. data PercentageSize PercentageSize :: Rational -> PercentageSize -- | Normalized value, 1 == 100%. percentageSizeValue :: PercentageSize -> Rational -- | Constructs PercentageSize. Not intended for direct use, see -- mkSize. percentageSize :: Rational -> PercentageSize data PixelSize PixelSize :: Rational -> PixelSize instance Eq PixelSize instance Ord PixelSize instance ToCss PixelSize instance Fractional PixelSize instance Num PixelSize instance Show PixelSize instance Eq ExSize instance Ord ExSize instance ToCss ExSize instance Fractional ExSize instance Num ExSize instance Show ExSize instance Eq EmSize instance Ord EmSize instance ToCss EmSize instance Fractional EmSize instance Num EmSize instance Show EmSize instance Show Color instance Show Content instance Eq Content instance Eq AbsoluteUnit instance Show AbsoluteUnit instance Eq PercentageSize instance Ord PercentageSize instance ToCss PercentageSize instance Fractional PercentageSize instance Num PercentageSize instance Show PercentageSize instance ToCss AbsoluteSize instance Fractional AbsoluteSize instance Num AbsoluteSize instance Ord AbsoluteSize instance Eq AbsoluteSize instance Show AbsoluteSize instance ToCss Text instance ToCss Text instance ToCss [Char] instance ToCss Color module Text.Lucius type Lucius a = Cassius a renderLucius :: (url -> [(String, String)] -> String) -> Cassius url -> Text lucius :: QuasiQuoter instance Show Content instance Eq Content module Text.Julius type Julius url = (url -> [(String, String)] -> String) -> Javascript newtype Javascript Javascript :: Builder -> Javascript class ToJavascript a toJavascript :: ToJavascript a => a -> Builder renderJulius :: (url -> [(String, String)] -> String) -> Julius url -> Text julius :: QuasiQuoter juliusFile :: FilePath -> Q Exp juliusFileDebug :: FilePath -> Q Exp instance Monoid Javascript instance Show Content instance Eq Content instance ToJavascript Value instance ToJavascript Root instance ToJavascript Text instance ToJavascript Text instance ToJavascript [Char] -- | 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 -> [(String, String)] -> 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 -> [(String, String)] -> String) -> m Html renderHamletRT' :: Failure HamletException m => Bool -> HamletRT -> HamletMap url -> (url -> [(String, String)] -> String) -> 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 -- | Calls hamletWithSettings with defaultHamletSettings. hamlet :: QuasiQuoter -- | Calls hamletWithSettings using XHTML 1.0 Strict settings. xhamlet :: QuasiQuoter -- | Calls hamletWithSettings with debugHamletSettings. hamletDebug :: QuasiQuoter -- | Calls hamletFileWithSettings with defaultHamletSettings. hamletFile :: FilePath -> Q Exp -- | Calls hamletFileWithSettings using XHTML 1.0 Strict settings. xhamletFile :: FilePath -> Q Exp hamletFileDebug :: FilePath -> Q Exp -- | A quasi-quoter that converts Hamlet syntax into a function of form: -- --
-- (url -> String) -> Html ---- -- Please see accompanying documentation for a description of Hamlet -- syntax. hamletWithSettings :: HamletSettings -> QuasiQuoter hamletFileWithSettings :: HamletSettings -> FilePath -> Q Exp -- | Settings for parsing of a hamlet document. data HamletSettings HamletSettings :: String -> Bool -> (String -> CloseStyle) -> HamletSettings -- | The value to replace a "!!!" with. Do not include the trailing -- newline. hamletDoctype :: HamletSettings -> String -- | Should we put a newline after closing a tag? Mostly useful for debug -- output. hamletCloseNewline :: HamletSettings -> Bool -- | How a tag should be closed. Use this to switch between HTML, XHTML or -- even XML output. hamletCloseStyle :: HamletSettings -> String -> CloseStyle -- | Defaults settings: HTML5 doctype and HTML-style empty tags. defaultHamletSettings :: HamletSettings xhtmlHamletSettings :: HamletSettings -- | Simplification of the HtmlM datatype. type Html = HtmlM () -- | An function generating an Html given a URL-rendering function. type Hamlet url = (url -> [(String, String)] -> String) -> Html class Monad (HamletMonad a) => HamletValue a where { data family HamletMonad a :: * -> *; type family HamletUrl a; } toHamletValue :: HamletValue a => HamletMonad a () -> a htmlToHamletMonad :: HamletValue a => Html -> HamletMonad a () urlToHamletMonad :: HamletValue a => HamletUrl a -> [(String, String)] -> HamletMonad a () fromHamletValue :: HamletValue a => a -> HamletMonad a () -- | Create an HTML snippet from a String without escaping preEscapedString :: String -> Html -- | Create an HTML snippet from a String. string :: String -> Html -- | Insert a ByteString. This is an unsafe operation: -- --