Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
Snap is a simple and fast web development framework and server written in Haskell. For more information about Snap, read the
README.SNAP.mdor visit the Snap project website at http://www.snapframework.com/.
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
snapfor 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.
After you clone the repository, change to the newly created snap directory and run
git submodule update --init --recursive ./init-sandbox.sh cabal install
(You may want to look at pull.sh or pullLatestMaster.sh.) 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.
The haddock documentation can be built using 'cabal haddock'.
The docs get put in
dist/doc/html/.
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
hpctest coverage report in
dist/hpc.
Tutorial.lhswhich is in the
project_template/tutorial/srcdirectory of the
snap-templatespackage.