Snap project starter executable plus some libraries for building web apps
Haskell CSS Other
Latest commit deeaeff Nov 14, 2016 @mightybyte mightybyte committed on GitHub Merge pull request #184 from bergmark/lens-quickcheck
Allow lens 4.15.* and QuickCheck 2.9.*
Failed to load latest commit information.
deps bump snap-server submodule Aug 2, 2016
extra Remove Droid serif from the haddocks Feb 5, 2011
.gitmodules Change submodules to use public github links Dec 23, 2015
.travis.yml Whitespace. Sep 15, 2014
LICENSE Fix readme Oct 24, 2011
cabal.project Fix Feb 5, 2011 Give some shell scripts shebang headers. Apr 11, 2015 deps versions update Jun 30, 2016 Update cabal.project and fix two Heist snaplet tests Aug 2, 2016
snap.cabal Allow lens 4.15.* and QuickCheck 2.9.* Nov 13, 2016

Snap Framework Hackage Status

Build Status

Snap is a simple and fast web development framework and server written in Haskell. For more information about Snap, read the or visit the Snap project website at

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. As of version 1.0, the snap command-line utility is no longer provided by this package. It is now provided by the package snap-templates.

Building snap

After you clone the repository, change to the newly created snap directory and run

git submodule update --init --recursive
cabal install

(You may want to look at or This updates all the Snap Framework dependencies to the correct version, creates a sandbox, and installs everything. The snap library is built using Cabal and Hackage.

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:

$ ./

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