heist

An Haskell template system supporting both HTML5 and XML.

http://snapframework.com/

Version on this page:1.1.1.2
LTS Haskell 22.40:1.1.1.2@rev:3
Stackage Nightly 2024-11-04: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-1.1.1.2@sha256:5b349daca9db76147bf7c26b0e10c6a4a5b93f8137658ae29de25d86d3de45e8,8655

Heist

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>
<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.

Changes

1.1.1.2

  • Support GHC 9.8
  • Fix broken test

1.1.1.1

  • Support GHC 9.6

1.1.1.0

  • Expose lookupTemplate and splitTemplatePath

  • Bump dependency bounds for 9.4

1.1

  • 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

1.0.1.3

  • Add Semigroup instances to support GHC 8.4

1.0.1.0

  • 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

1.0.0.1

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

1.0.0.0

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

0.14.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

0.13.0

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

  • Simpler compiled splice API
  • New splice syntax