hamlet-0.10.3: Haml-like template files that are compile-time checked

Text.Hamlet

Contents

Synopsis

Plain HTML

type Html = HtmlM ()

Simplification of the HtmlM datatype.

Hamlet

type HtmlUrl url = Render url -> HtmlSource

A function generating an Html given a URL-rendering function.

I18N Hamlet

type HtmlUrlI18n msg url = Translate msg -> Render url -> HtmlSource

A function generating an Html given a message translator and a URL rendering function.

Internal, for making more

data HamletSettings Source

Settings for parsing of a hamlet document.

defaultHamletSettings :: HamletSettingsSource

Defaults settings: HTML5 doctype and HTML-style empty tags.

data Env Source

Constructors

Env 

Fields

urlRender :: Maybe ((Exp -> Q Exp) -> Q Exp)
 
msgRender :: Maybe ((Exp -> Q Exp) -> Q Exp)
 

data HamletRules Source

Constructors

HamletRules 

Fields

hrFromHtml :: Exp
 
hrWithEnv :: (Env -> Q Exp) -> Q Exp
 
hrEmbed :: Env -> Exp -> Q Exp