The hamlet package

[ Tags: deprecated, library, mit, web, yesod ] [ Propose Tags ]
Deprecated. in favor of shakespeare

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.

As a quick overview, here is a sample Hamlet template (note that, due to some issues with Haddock, I have replaced braces ({ and }) with double-square-brackets ([[ and ]])):

!!!
<html
    <head
        <title>Hamlet Demo
    <body
        <h1>Information on #[[name person]]
        <p>#[[name person]] is #[[age person]] years old.
        <h2
            $if isMarried person
                Married
            $else
                Not married
        <ul
            $forall child <- children person
                <li>#[[child]]
        <p
            <a href=@[[page person]]>See the page.
        ^[[footer]]

Properties

Versions 0.0.0, 0.0.1, 0.0.2, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.3.1, 0.3.0, 0.3.1, 0.3.1.1, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.5.0.1, 0.5.0.2, 0.5.1, 0.5.1.1, 0.5.1.2, 0.6.0, 0.6.0.1, 0.6.0.2, 0.6.0.3, 0.6.1, 0.6.1.1, 0.6.1.2, 0.7.0, 0.7.0.1, 0.7.0.2, 0.7.1, 0.7.2, 0.7.2.1, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.2.1, 0.9.0, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.10.6, 0.10.7, 0.10.7.1, 0.10.8, 0.10.9.1, 1.0.0, 1.0.1, 1.0.1.1, 1.0.1.2, 1.0.1.3, 1.0.1.4, 1.1.0, 1.1.0.1, 1.1.0.2, 1.1.0.3, 1.1.1, 1.1.1.1, 1.1.2, 1.1.3, 1.1.3.1, 1.1.4, 1.1.5, 1.1.6, 1.1.6.1, 1.1.6.2, 1.1.6.3, 1.1.6.4, 1.1.7, 1.1.7.1, 1.1.7.2, 1.1.7.3, 1.1.7.4, 1.1.7.5, 1.1.7.6, 1.1.7.7, 1.1.8, 1.1.8.1, 1.1.9, 1.1.9.1, 1.1.9.2, 1.2.0
Dependencies base (==4.*), blaze-builder (==0.2.*), blaze-html (==0.4.*), bytestring (==0.9.*), containers (>=0.2 && <0.5), failure (==0.1.*), HUnit, json-enumerator (==0.0.*), json-types (==0.1.*), parsec (>=2 && <4), QuickCheck (==2.*), template-haskell, test-framework, test-framework-hunit, text (>=0.7 && <0.12) [details]
License BSD3
Author Michael Snoyman <michael@snoyman.com>
Maintainer Michael Snoyman <michael@snoyman.com>
Category Web, Yesod
Home page http://docs.yesodweb.com/
Source repository head: git clone git://github.com/snoyberg/hamlet.git
Uploaded Tue Feb 15 04:48:29 UTC 2011 by MichaelSnoyman
Distributions Debian:1.1.9.2, LTSHaskell:1.2.0, NixOS:1.2.0, Stackage:1.2.0, Tumbleweed:1.2.0
Executables hamlet6to7, runtests
Downloads 48380 total (120 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
test

Build the executable to run unit tests

DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees