An Haskell template system supporting both HTML5 and XML.


Version on this page:
LTS Haskell 22.29:
Stackage Nightly 2024-07-20:
Latest on Hackage:

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-,8655


GitHub CI

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>

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:


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.


  • Support GHC 9.8
  • Fix broken test

  • Support GHC 9.6

  • Expose lookupTemplate and splitTemplatePath

  • Bump dependency bounds for 9.4


  • Remove pandoc and pandocBS

  • Stop exporting readProcessWithExitCode’

  • Remove -S and –no-wrap arguments to pandoc for compatibility with both 1.x and 2.x versions of the pandoc command line tool

  • Bump map-syntax lower bound to fix 8.4 build problem

  • Add Semigroup instances to support GHC 8.4

  • Change benchmark from an executable section to a benchmark section in the cabal file. This eliminates the criterion dependency when doing “cabal install heist”.
  • Export manyWith

  • Drop the dependency on errors packages from heist testsuite and benchmark
  • Fix nested splice namespace warning bug (issue #85)

  • Switch from MonadCatchIO-transformers to monad-control for Snap 1.0


See http://snapframework.com/blog/2014/09/24/heist-0.14-released

  • Add namespace support (hcNamespace and hcErrorNotBound)
  • Add tellSpliceError for generalized error reporting
  • Restructured HeistConfig, export lenses instead of field accessors
  • Moved old HeistConfig into SpliceConfig
  • Factored SpliceAPI module out into separate map-syntax package


See http://snapframework.com/blog/2013/09/09/snap-0.13-released

  • Simpler compiled splice API
  • New splice syntax