Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Snap project starter executable plus some libraries for building web apps
Failed to load latest commit information.
extra Remove Droid serif from the haddocks
src Add variant of serveSnaplet that does not parse command-line arguments
test Change back to original cwd on exit from testsuite.
.ghci whitespace
.gitignore Bump dependency versions.
.stylish-haskell.yaml More explicit imports, add stylish haskell config
CHECKLIST.md Whitespace.
CONTRIBUTORS Added Alfredo to the contributors list
LICENSE
README.SNAP.md Fix readme
README.md Update extra-source-files list. Update README testsuite instructions
Setup.hs Fix sdist issues
changelog.md rename changelog lowercase
design.md Fixed a couple more inline code places.
haddock.sh Fix haddock.sh
runTestsAndCoverage.sh
snap.cabal Don't expect to be able to deepseq lazy bytestrings -- this doesn't w…

README.md

Snap Framework

Snap is a simple and fast web development framework and server written in Haskell. For more information about Snap, read the README.SNAP.md or visit the Snap project website at http://www.snapframework.com/.

Library contents

This is top-level project for the Snap Framework, which contains:

  • a library allowing Snap applications to recompile actions on the fly in development mode, with no performance loss in production mode.

  • a "snaplet" API allowing web applications to be build from composable pieces.

The command-line utility snap for creating initial Snap applications used to be a part of this package. Since version 1.0, it is provided by the package snap-template.

Building snap

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

cabal install

from the snap toplevel directory.

Building the Haddock Documentation

The haddock documentation can be built using 'cabal haddock'.

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

Building the testsuite

To build the test suite, run

$ cabal clean
$ cabal configure --enable-tests --enable-library-coverage
$ cabal build
$ cabal install --enable-tests

From here you can invoke the testsuite by running:

$ ./runTestsAndCoverage.sh

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

Roadmap to Understanding Snaplets

  1. Read Tutorial.lhs which is in the project_template/tutorial/src directory of the snap-template package.
  2. Generate and read the haddock docs.
  3. The test code has the nice property that it actually functions as a pretty good example app and covers a lot of the use cases.
  4. If you're interested in the implementation, read design.md.
Something went wrong with that request. Please try again.