snap

Top-level package for the Snap Web Framework

http://snapframework.com/

Version on this page:0.14.0.7
LTS Haskell 22.14:1.1.3.3
Stackage Nightly 2024-03-28:1.1.3.3
Latest on Hackage:1.1.3.3

See all snapshots snap appears in

BSD-3-Clause licensed by Ozgun Ataman, Doug Beardsley, Gregory Collins, Carl Howells, Chris Smith
Maintained by [email protected]
This version can be pinned in stack with:snap-0.14.0.7@sha256:7af258b11f4738bea9b5b3385a5a690c327f3cd9ceb79a24570a2c2b9a1ddde8,8862

Snap Framework

Snap is a web framework for Haskell, based on iteratee I/O (as popularized by Oleg Kiselyov). 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 command-line utility for creating initial Snap applications

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

Building snap

The snap tool and library are 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, 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.

Roadmap to Understanding Snaplets

  1. Read Tutorial.lhs which is in project_template/tutorial/src.
  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.

Changes

0.14.0.7

Fix issue #147, problems compiling with executable profiling

0.14.0.5

  • Eliminate unnecessary dependency on syb

0.14.0

  • Allow lens-4.8
  • Remove re-export of Control.Lens.Loupe, since it was removed upstream.
  • Remove re-exports of other non-snap modules in Snap.