heist

An Haskell template system supporting both HTML5 and XML.

http://snapframework.com/

Version on this page:0.14.1@rev:4
LTS Haskell 22.39:1.1.1.2@rev:3
Stackage Nightly 2024-10-31:1.1.1.2@rev:3
Latest on Hackage:1.1.1.2@rev:3

See all snapshots heist appears in

BSD-3-Clause licensed by Doug Beardsley, Gregory Collins
Maintained by [email protected]
This version can be pinned in stack with:heist-0.14.1@sha256:d61d5b4f4b360c12b46179000fe761037a23182489362188c929476a42248876,6105

Heist

Heist, part of the Snap Framework, is a Haskell library for xml/html templating. It uses simple XML tags to bind values to your templates in a straightforward way. For example, if you were to put the following in a template:

<bind tag="message">some text</bind>
<p><message/></p>

the resulting xhtml would be

<p>some text</p>

Likewise, if you need to add text to an attribute,

<bind tag="special">special-id</bind>
<div id="$(special)">very special</div>

gives you

<div id="special-id">very special</div>

Values can also be pulled from “Splices” (see the documentation for more information.)

Building heist

The heist library is built using Cabal and Hackage. Just run

cabal install

from the heist toplevel directory.

Building the Haddock Documentation

The haddock documentation can be built using the supplied haddock.sh shell script:

./haddock.sh

The docs get put in dist/doc/html/.

Building the testsuite

To build the test suite, cd into the test/ directory and run

$ cabal configure
$ cabal build

From here you can invoke the testsuite by running:

$ ./runTestsAndCoverage.sh 

The testsuite generates an hpc test coverage report in test/dist/hpc.