-- 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.9.0 -- | General parsers, functions and datatypes for all three languages. module Text.Shakespeare data Deref DerefModulesIdent :: [String] -> Ident -> Deref DerefIdent :: Ident -> Deref DerefIntegral :: Integer -> Deref DerefRational :: Rational -> Deref DerefString :: String -> Deref DerefBranch :: Deref -> Deref -> Deref newtype Ident Ident :: String -> Ident type Scope = [(Ident, Exp)] parseDeref :: Parser Deref parseHash :: Parser (Either String Deref) parseVar :: Char -> Parser (Either String Deref) parseAt :: Parser (Either String (Deref, Bool)) parseUrl :: Char -> Char -> Parser (Either String (Deref, Bool)) parseCaret :: Parser (Either String Deref) parseUnder :: Parser (Either String Deref) parseInt :: Char -> Parser (Either String Deref) derefToExp :: Scope -> Deref -> Exp flattenDeref :: Deref -> Maybe [String] readUtf8File :: FilePath -> IO Text instance Typeable Ident instance Typeable Deref instance Show Ident instance Eq Ident instance Read Ident instance Data Ident instance Show Deref instance Eq Deref instance Read Deref instance Data Deref instance Lift Deref instance Lift Ident module Text.Cassius type Cassius url = (url -> [(Text, Text)] -> Text) -> Css type Css = [CssTop] class ToCss a toCss :: ToCss a => a -> Builder renderCassius :: (url -> [(Text, Text)] -> Text) -> 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 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 Color module Text.Lucius type Lucius a = Cassius a renderLucius :: (url -> [(Text, Text)] -> Text) -> Lucius url -> Text -- |
-- >>> renderLucius undefined [lucius|foo{bar:baz}|]
-- "foo{bar:baz}"
--
lucius :: QuasiQuoter
luciusFile :: FilePath -> Q Exp
luciusFileDebug :: FilePath -> Q Exp
-- | For lack of a better name... a parameterized version of Julius.
module Text.Romeo
data RomeoSettings
RomeoSettings :: Char -> Char -> Char -> Exp -> Exp -> Exp -> RomeoSettings
varChar :: RomeoSettings -> Char
urlChar :: RomeoSettings -> Char
intChar :: RomeoSettings -> Char
toBuilder :: RomeoSettings -> Exp
wrap :: RomeoSettings -> Exp
unwrap :: RomeoSettings -> Exp
defaultRomeoSettings :: RomeoSettings
romeo :: RomeoSettings -> QuasiQuoter
romeoFile :: RomeoSettings -> FilePath -> Q Exp
romeoFileDebug :: RomeoSettings -> FilePath -> Q Exp
instance Show Content
instance Eq Content
instance Lift RomeoSettings
module Text.Julius
type Julius url = (url -> [(Text, Text)] -> Text) -> Javascript
newtype Javascript
Javascript :: Builder -> Javascript
unJavascript :: Javascript -> Builder
class ToJavascript a
toJavascript :: ToJavascript a => a -> Builder
renderJulius :: (url -> [(Text, Text)] -> Text) -> Julius url -> Text
julius :: QuasiQuoter
juliusFile :: FilePath -> Q Exp
juliusFileDebug :: FilePath -> Q Exp
instance Monoid Javascript
instance ToJavascript Text
instance ToJavascript Text
instance ToJavascript [Char]
module Text.Coffee
class ToCoffee c
toCoffee :: ToCoffee c => c -> Builder
type Coffee url = (url -> [(Text, Text)] -> Text) -> Coffeescript
coffee :: QuasiQuoter
coffeeFile :: FilePath -> Q Exp
coffeeFileDebug :: FilePath -> Q Exp
renderCoffee :: (url -> [(Text, Text)] -> Text) -> Coffee url -> IO Text
instance Monoid Coffeescript
instance ToCoffee Text
instance ToCoffee Text
instance ToCoffee [Char]
module Text.Hamlet
-- | Simplification of the HtmlM datatype.
type Html = HtmlM ()
html :: QuasiQuoter
htmlFile :: FilePath -> Q Exp
xhtml :: QuasiQuoter
xhtmlFile :: FilePath -> Q Exp
-- | A function generating an Html given a URL-rendering function.
type Hamlet 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 IHamlet msg url = Translate msg -> Render url -> Html
ihamlet :: QuasiQuoter
ihamletFile :: FilePath -> Q Exp
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