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

Safe Haskell | None

Text.Hamlet.RT

Contents

- Public API

Description

Most everything exported here is exported also by Text.Hamlet. The exceptions to that rule should not be necessary for normal usage.

Synopsis

- newtype HamletRT = HamletRT [SimpleDoc]
- data HamletData url
  - = HDHtml Html
  - | HDUrl url
  - | HDUrlParams url [(Text, Text)]
  - | HDTemplate HamletRT
  - | HDBool Bool
  - | HDMaybe (Maybe (HamletMap url))
  - | HDList [HamletMap url]
- type HamletMap url = [([String], HamletData url)]
- data HamletException
  - = HamletParseException String
  - | HamletUnsupportedDocException Doc
  - | HamletRenderException String
- 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
  - | SDVar [String]
  - | SDUrl Bool [String]
  - | SDTemplate [String]
  - | SDForall [String] String [SimpleDoc]
  - | SDMaybe [String] String [SimpleDoc] [SimpleDoc]
  - | SDCond [([String], [SimpleDoc])] [SimpleDoc]

# Public API

newtype HamletRT Source

Constructors

HamletRT [SimpleDoc] |

data HamletData url Source

Constructors

HDHtml Html |
HDUrl url |
HDUrlParams url [(Text, Text)] |
HDTemplate HamletRT |
HDBool Bool |
HDMaybe (Maybe (HamletMap url)) |
HDList [HamletMap url] |

type HamletMap url = [([String], HamletData url)]Source

data HamletException Source

Constructors

HamletParseException String |
HamletUnsupportedDocException Doc |
HamletRenderException String |

Instances

Show HamletException |
Typeable HamletException |
Exception HamletException |

parseHamletRT :: Failure HamletException m => HamletSettings -> String -> m HamletRT Source

renderHamletRT :: Failure HamletException m => HamletRT -> HamletMap url -> (url -> [(Text, Text)] -> Text) -> m Html Source

renderHamletRT' :: Failure HamletException m => Bool -> HamletRT -> HamletMap url -> (url -> [(Text, Text)] -> Text) -> m Html Source

data SimpleDoc Source

Constructors

SDRaw String |
SDVar [String] |
SDUrl Bool [String] |
SDTemplate [String] |
SDForall [String] String [SimpleDoc] |
SDMaybe [String] String [SimpleDoc] [SimpleDoc] |
SDCond [([String], [SimpleDoc])] [SimpleDoc] |