heist-0.14.1.1/ 0000755 0000000 0000000 00000000000 12547536254 011253 5 ustar 00 0000000 0000000 heist-0.14.1.1/.ghci 0000644 0000000 0000000 00000000215 12547536254 012164 0 ustar 00 0000000 0000000 :set -XOverloadedStrings
:set -XCPP
:set -Wall
:set -isrc
:set -itest/suite
:set -hide-package MonadCatchIO-mtl
:set -hide-package monads-tf
heist-0.14.1.1/TODO 0000644 0000000 0000000 00000000174 12547536254 011745 0 ustar 00 0000000 0000000 * Fix handling of ".." in apply tags
Ongoing
-------
* Improve test coverage
* Head merging (ala the Lift Web Framework)
heist-0.14.1.1/README.md 0000644 0000000 0000000 00000002634 12547536254 012537 0 ustar 00 0000000 0000000 # Heist
Heist, part of the [Snap Framework](http://www.snapframework.com/), 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:
some text
the resulting xhtml would be
some text
Likewise, if you need to add text to an attribute,
special-id
very special
gives you
very special
Values can also be pulled from "Splices" (see
[the documentation](http://snapframework.com/docs/tutorials/heist#heist-programming)
for more information.)
## Building heist
The heist library is built using [Cabal](http://www.haskell.org/cabal/) and
[Hackage](http://hackage.haskell.org/packages/hackage.html). 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`.
heist-0.14.1.1/CONTRIBUTORS 0000644 0000000 0000000 00000000416 12547536254 013134 0 ustar 00 0000000 0000000 Doug Beardsley
Gregory Collins
Carl Howells
Edward Kmett
Will Langstroth
Shane O'Brien
James Sanders
Mark Wright
heist-0.14.1.1/LICENSE 0000644 0000000 0000000 00000002745 12547536254 012270 0 ustar 00 0000000 0000000 Copyright (c) 2009, Snap Framework authors (see CONTRIBUTORS)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of the Snap Framework authors nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
heist-0.14.1.1/haddock.sh 0000755 0000000 0000000 00000000445 12547536254 013212 0 ustar 00 0000000 0000000 #!/bin/sh
set -x
HADDOCK_OPTS='--html-location=http://hackage.haskell.org/packages/archive/$pkg/latest/doc/html --css=extra/haddock.css'
cabal haddock $HADDOCK_OPTS --hyperlink-source $@
cp extra/logo.gif dist/doc/html/heist/haskell_icon.gif
cp extra/hscolour.css dist/doc/html/heist/src/
heist-0.14.1.1/heist.cabal 0000644 0000000 0000000 00000013415 12547536254 013357 0 ustar 00 0000000 0000000 name: heist
version: 0.14.1.1
synopsis: An Haskell template system supporting both HTML5 and XML.
description:
Heist is a powerful template system that supports both HTML5 and XML.
Some of Heist's features are:
.
* Designer-friendly HTML5 (or XML) syntax
.
* Templates can be reloaded to make changes visible without recompiling
your Haskell code
.
* Enforces near-perfect separation of business logic and view
.
* Powerful abstraction primitives allowing you to eliminate repetition
.
* Easy creation of domain-specific markup languages
.
* Built-in support for including JSON and Markdown content in templates
.
* Simple mechanism for designer-specified template caching
.
* Optional merging of multiple \ tags defined anywhere in the
document
license: BSD3
license-file: LICENSE
author: Doug Beardsley, Gregory Collins
maintainer: snap@snapframework.com
build-type: Simple
cabal-version: >= 1.6
homepage: http://snapframework.com/
category: Web, Snap
extra-source-files:
.ghci,
CONTRIBUTORS,
docs/Makefile,
docs/templates.css,
docs/templates.md,
examples/ex01/home.tpl,
examples/ex01/nav.tpl,
examples/ex02/default.tpl,
examples/ex02/home.tpl,
examples/ex03/default.tpl,
examples/ex03/home.tpl,
examples/test01.tpl,
examples/test02.tpl,
extra/haddock.css,
extra/hscolour.css,
extra/logo.gif,
haddock.sh,
LICENSE,
README.md,
README.SNAP.md,
test/.ghci,
test/heist-testsuite.cabal,
test/README,
test/runTestsAndCoverage.sh,
test/suite/Benchmark.hs,
test/suite/Heist/Compiled/Tests.hs,
test/suite/Heist/Interpreted/Tests.hs,
test/suite/Heist/TestCommon.hs,
test/suite/Heist/Tests.hs,
test/suite/Heist/Tutorial/AttributeSplices.lhs,
test/suite/Heist/Tutorial/CompiledSplices.lhs,
test/suite/Heist/Tutorial/Imports.hs,
test/suite/TestSuite.hs,
test/templates/a.tpl,
test/templates/attr_splice.tpl,
test/templates/attrs.tpl,
test/templates/attrsubtest1.tpl,
test/templates/attrsubtest2.tpl,
test/templates/bar/a.tpl,
test/templates/bar/index.tpl,
test/templates/bind-apply-interaction/_outer.tpl,
test/templates/bind-apply-interaction/caller.tpl,
test/templates/bind-attrs.tpl,
test/templates/bind_param.tpl,
test/templates/cache.tpl,
test/templates/div_expansion.tpl,
test/templates/foo/a.tpl,
test/templates/foo/b.tpl,
test/templates/foo/markdown-chdir.tpl,
test/templates/foo/markdown-origdir.tpl,
test/templates/foo/test2.md,
test/templates/head_merge/index.tpl,
test/templates/head_merge/nav.tpl,
test/templates/head_merge/wrap.tpl,
test/templates/index.tpl,
test/templates/ioc.tpl,
test/templates/json.tpl,
test/templates/json_object.tpl,
test/templates/json_snippet.tpl,
test/templates/markdown.tpl,
test/templates/page.tpl,
test/templates/people.tpl,
test/templates/post.tpl,
test/templates/readme.txt,
test/templates/test.md,
test/templates/textarea_expansion.tpl,
test/templates/title_expansion.tpl,
test/templates/user/admin/main.tpl,
test/templates/user/admin/menu.tpl,
test/templates/user/main.tpl,
test/templates/user/menu.tpl,
test/templates-bad/apply-missing-attr.tpl,
test/templates-bad/apply-template-not-found.tpl,
test/templates-bad/bind-infinite-loop.tpl,
test/templates-bad/bind-missing-attr.tpl,
TODO
Library
hs-source-dirs: src
exposed-modules:
Heist,
Heist.Compiled,
Heist.Compiled.LowLevel,
Heist.Internal.Types,
Heist.Interpreted,
Heist.SpliceAPI,
Heist.Splices,
Heist.Splices.Apply,
Heist.Splices.Bind,
Heist.Splices.BindStrict,
Heist.Splices.Cache,
Heist.Splices.Html,
Heist.Splices.Ignore,
Heist.Splices.Json,
Heist.Splices.Markdown,
Heist.TemplateDirectory
other-modules:
Data.HeterogeneousEnvironment,
Heist.Common,
Heist.Compiled.Internal,
Heist.Internal.Types.HeistState,
Heist.Interpreted.Internal
build-depends:
MonadCatchIO-transformers >= 0.2.1 && < 0.4,
aeson >= 0.6 && < 0.9,
attoparsec >= 0.10 && < 0.14,
base >= 4.5 && < 5,
blaze-builder >= 0.2 && < 0.5,
blaze-html >= 0.4 && < 0.9,
bytestring >= 0.9 && < 0.11,
containers >= 0.2 && < 0.6,
directory >= 1.1 && < 1.3,
directory-tree >= 0.10 && < 0.13,
dlist >= 0.5 && < 0.8,
either >= 3.1 && < 4.5,
filepath >= 1.3 && < 1.5,
hashable >= 1.1 && < 1.3,
map-syntax >= 0.2 && < 0.3,
mtl >= 2.0 && < 2.3,
process >= 1.1 && < 1.3,
random >= 1.0.1.0 && < 1.2,
text >= 0.10 && < 1.3,
time >= 1.1 && < 1.6,
transformers >= 0.3 && < 0.5,
unordered-containers >= 0.1.4 && < 0.3,
vector >= 0.9 && < 0.11,
xmlhtml >= 0.2.3 && < 0.3
if impl(ghc >= 6.12.0)
ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
-fno-warn-unused-do-bind
else
ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
ghc-prof-options: -prof -auto-all
Extensions:
GeneralizedNewtypeDeriving,
PackageImports,
ScopedTypeVariables,
DeriveDataTypeable,
FlexibleInstances,
MultiParamTypeClasses,
UndecidableInstances,
OverloadedStrings,
TypeSynonymInstances,
NoMonomorphismRestriction
source-repository head
type: git
location: https://github.com/snapframework/heist.git
heist-0.14.1.1/Setup.hs 0000644 0000000 0000000 00000000057 12547536254 012711 0 ustar 00 0000000 0000000 import Distribution.Simple
main = defaultMain
heist-0.14.1.1/README.SNAP.md 0000644 0000000 0000000 00000002273 12547536254 013276 0 ustar 00 0000000 0000000 Snap Framework
--------------
Snap is a simple and fast web development framework and server written in
Haskell. For more information or to download the latest version, you can visit
the Snap project website at http://snapframework.com/.
Snap Status and Features
------------------------
The Snap core system consists of:
* a high-speed HTTP server, with an optional high-concurrency backend using
the [libev](http://software.schmorp.de/pkg/libev.html) library
* a sensible and clean monad for web programming
* an xml-based templating system for generating HTML that allows you to bind
Haskell functionality to XML tags without getting PHP-style tag soup all
over your pants
* a "snaplet" system for building web sites from composable pieces.
Snap is currently only officially supported on Unix platforms; it has been
tested on Linux and Mac OSX Snow Leopard, and is reported to work on Windows.
Snap Philosophy
---------------
Snap aims to be the *de facto* web toolkit for Haskell, on the basis of:
* High performance
* High design standards
* Simplicity and ease of use, even for Haskell beginners
* Excellent documentation
* Robustness and high test coverage
heist-0.14.1.1/extra/ 0000755 0000000 0000000 00000000000 12547536254 012376 5 ustar 00 0000000 0000000 heist-0.14.1.1/extra/hscolour.css 0000644 0000000 0000000 00000000737 12547536254 014755 0 ustar 00 0000000 0000000 body { font-size: 90%; }
pre, code, body {
font-family: Monaco,
"DejaVu Sans Mono",
"Bitstream Vera Sans Mono",
"Lucida Console",
monospace;
}
.hs-keyglyph, .hs-layout {color: #5200A3;}
.hs-keyword {color: #3465a4; font-weight: bold;}
.hs-comment, .hs-comment a {color: #579; }
.hs-str, .hs-chr {color: #141B24;}
.hs-keyword, .hs-conid, .hs-varid, .hs-conop, .hs-varop, .hs-num, .hs-cpp, .hs-sel, .hs-definition {}
heist-0.14.1.1/extra/haddock.css 0000644 0000000 0000000 00000020231 12547536254 014503 0 ustar 00 0000000 0000000 /* -------- Global things --------- */
HTML {
background-color: #f0f3ff;
width: 100%;
}
BODY {
-moz-border-radius:5px;
-webkit-border-radius:5px;
width: 50em;
margin: 2em auto;
padding: 0;
background-color: #ffffff;
color: #000000;
font-size: 110%;
font-family: Georgia, serif;
}
A:link { color: #5200A3; text-decoration: none }
A:visited { color: #5200A3; text-decoration: none }
A:hover { color: #5200A3; text-decoration: none; border-bottom:#5200A3 dashed 1px; }
TABLE.vanilla {
width: 100%;
border-width: 0px;
/* I can't seem to specify cellspacing or cellpadding properly using CSS... */
}
DL {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
letter-spacing: -0.01em;
margin: 0;
}
.vanilla .vanilla dl { font-size: 80%; }
.vanilla .vanilla dl dl { padding-left: 0; font-size: 95%; }
TD.section1, TD.section2, TD.section3, TD.section4, TD.doc, DL {
padding: 0 30px 0 34px;
}
TABLE.vanilla2 {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
border-width: 0px;
}
/* font is a little too small in MSIE */
TT, PRE, CODE {
font-family: Monaco,
"DejaVu Sans Mono",
"Bitstream Vera Sans Mono",
"Lucida Console",
monospace;
font-size: 90%;
}
LI P { margin: 0pt }
P { margin-top: 0; margin-bottom: 0.75em; }
TD {
border-width: 0px;
}
TABLE.narrow {
border-width: 0px;
}
TD.s8 { height: 0; margin:0; padding: 0 }
TD.s15 { height: 20px; }
SPAN.keyword { text-decoration: underline; }
/* Resize the buttom image to match the text size */
IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em }
/* --------- Contents page ---------- */
DIV.node {
padding-left: 3em;
}
DIV.cnode {
padding-left: 1.75em;
}
SPAN.pkg {
position: absolute;
left: 50em;
}
/* --------- Documentation elements ---------- */
TD FONT { font-weight: bold; letter-spacing: -0.02em; }
TD.children {
padding-left: 25px;
}
TD.synopsis {
padding: 2px;
background-color: #f0f0f0;
font-size: 80%;
font-family: Monaco,
"DejaVu Sans Mono",
"Bitstream Vera Sans Mono",
"Lucida Console",
monospace;
}
TD.decl {
padding: 4px 8px;
background-color: #FAFAFA;
border-bottom: #F2F2F2 solid 1px;
border-top: #FCFCFC solid 1px;
font-size: 80%;
font-family: Monaco,
"DejaVu Sans Mono",
"Bitstream Vera Sans Mono",
"Lucida Console",
monospace;
vertical-align: top;
}
TD.decl TD.decl {
font-size: 100%;
padding: 4px 0;
border: 0;
}
TD.topdecl {
padding: 20px 30px 0.5ex 30px;
font-size: 80%;
font-family: Monaco,
"DejaVu Sans Mono",
"Bitstream Vera Sans Mono",
"Lucida Console",
monospace;
;
vertical-align: top;
}
.vanilla .vanilla .vanilla .topdecl {
padding-left: 0;
padding-right: 0;
}
.vanilla .vanilla .vanilla {
padding-left: 30px;
}
.decl .vanilla {
padding-left: 0px !important;
}
.body .vanilla .body {
padding-left: 0;
padding-right: 0;
}
.body .vanilla .body .decl {
padding-left: 12px;
}
.body .vanilla .body div .vanilla .decl {
padding-left: 12px;
}
TABLE.declbar {
background-color: #f0f0f0;
border-spacing: 0px;
border-bottom:1px solid #d7d7df;
border-right:1px solid #d7d7df;
border-top:1px solid #f4f4f9;
border-left:1px solid #f4f4f9;
padding: 4px;
}
TD.declname {
width: 100%;
padding-right: 4px;
}
TD.declbut {
padding-left: 8px;
padding-right: 5px;
border-left-width: 1px;
border-left-color: #000099;
border-left-style: solid;
white-space: nowrap;
font-size: x-small;
}
/*
arg is just like decl, except that wrapping is not allowed. It is
used for function and constructor arguments which have a text box
to the right, where if wrapping is allowed the text box squashes up
the declaration by wrapping it.
*/
TD.arg {
padding: 2px 12px;
background-color: #f0f0f0;
font-size: 80%;
font-family: Monaco,
"DejaVu Sans Mono",
"Bitstream Vera Sans Mono",
"Lucida Console",
monospace;
vertical-align: top;
white-space: nowrap;
}
TD.recfield { padding-left: 20px }
TD.doc {
padding-left: 38px;
font-size: 95%;
line-height: 1.66;
}
TD.ndoc {
font-size: 95%;
line-height: 1.66;
padding: 2px 4px 2px 8px;
}
TD.rdoc {
padding: 2px;
padding-left: 30px;
width: 100%;
font-size: 80%;
font-style: italic;
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
}
TD.body {
padding: 0 30px;
}
TD.pkg {
width: 100%;
padding-left: 30px
}
TABLE.indexsearch TR.indexrow {
display: none;
}
TABLE.indexsearch TR.indexshow {
display: table-row;
}
TD.indexentry {
vertical-align: top;
padding: 0 30px
}
TD.indexannot {
vertical-align: top;
padding-left: 20px;
white-space: nowrap
}
TD.indexlinks {
width: 100%
}
/* ------- Section Headings ------- */
TD.section1, TD.section2, TD.section3, TD.section4, TD.section5 {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
}
TD.section1 {
padding-top: 14px;
font-weight: bold;
letter-spacing: -0.02em;
font-size: 140%
}
TD.section2 {
padding-top: 4px;
font-weight: bold;
letter-spacing: -0.02em;
font-size: 120%
}
TD.section3 {
padding-top: 5px;
font-weight: bold;
letter-spacing: -0.02em;
font-size: 105%
}
TD.section4 {
font-weight: bold;
padding-top: 12px;
padding-bottom: 4px;
letter-spacing: -0.02em;
font-size: 90%
}
/* -------------- The title bar at the top of the page */
TD.infohead {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
color: #ffffff;
font-weight: bold;
padding: 0 30px;
text-align: left;
}
TD.infoval {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
color: #ffffff;
padding: 0 30px;
text-align: left;
}
TD.topbar {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
background-color: #3465a4;
padding: 5px;
-moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px;
-webkit-border-radius-topleft:5px;
-webkit-border-radius-topright:5px;
}
TD.title {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
color: #ffffff;
padding-left: 30px;
letter-spacing: -0.02em;
font-weight: bold;
width: 100%
}
TD.topbut {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
padding-left: 5px;
padding-right: 5px;
border-left-width: 1px;
border-left-color: #ffffff;
border-left-style: solid;
letter-spacing: -0.02em;
font-weight: bold;
white-space: nowrap;
}
TD.topbut A:link {
color: #ffffff
}
TD.topbut A:visited {
color: #ffff00
}
TD.topbut A:hover {
background-color: #C9D3DE;
}
TD.topbut:hover {
background-color: #C9D3DE;
}
TD.modulebar {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
color: #141B24;
background-color: #C9D3DE;
padding: 5px;
border-top-width: 1px;
border-top-color: #ffffff;
border-top-style: solid;
-moz-border-radius-bottomleft:5px;
-moz-border-radius-bottomright:5px;
-webkit-border-radius-bottomleft:5px;
-webkit-border-radius-bottomright:5px;
}
/* --------- The page footer --------- */
TD.botbar {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
-moz-border-radius:5px;
-webkit-border-radius:5px;
background-color: #3465a4;
color: #ffffff;
padding: 5px
}
TD.botbar A:link {
color: #ffffff;
text-decoration: underline
}
TD.botbar A:visited {
color: #ffff00
}
TD.botbar A:hover {
background-color: #6060ff
}
/* --------- Mini Synopsis for Frame View --------- */
.outer {
margin: 0 0;
padding: 0 0;
}
.mini-synopsis {
padding: 0.25em 0.25em;
}
.mini-synopsis H1 { font-size: 120%; }
.mini-synopsis H2 { font-size: 107%; }
.mini-synopsis H3 { font-size: 100%; }
.mini-synopsis H1, .mini-synopsis H2, .mini-synopsis H3 {
font-family: "Gill Sans", "Helvetica Neue","Arial",sans-serif;
margin-top: 0.5em;
margin-bottom: 0.25em;
padding: 0 0;
font-weight: bold; letter-spacing: -0.02em;
}
.mini-synopsis H1 { border-bottom: 1px solid #ccc; }
.mini-topbar {
font-size: 120%;
background: #0077dd;
padding: 0.25em;
}
heist-0.14.1.1/extra/logo.gif 0000644 0000000 0000000 00000001137 12547536254 014027 0 ustar 00 0000000 0000000 GIF89a ` J"K#M%N(P1W1X3Z6\?d4e=i9i:j