Skip to content

Core type definitions (Snap monad, HTTP types, etc) and utilities for web handlers.

License

Notifications You must be signed in to change notification settings

mulderr/snap-core

This branch is 109 commits behind snapframework/snap-core:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a0c0981 · Mar 26, 2017
Mar 11, 2015
Feb 5, 2011
Mar 26, 2017
Mar 26, 2017
Mar 24, 2017
Mar 25, 2014
Aug 8, 2016
Nov 26, 2011
Nov 23, 2010
Mar 3, 2014
Aug 2, 2016
May 20, 2010
Jun 7, 2010
Mar 26, 2017
Aug 6, 2016
Aug 6, 2016
Jun 22, 2011
Aug 7, 2016
Mar 26, 2017
Apr 14, 2010

Repository files navigation

Snap Framework Core

Build Status

Snap is a web framework for 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 the snap-core library, which contains:

  • primitive types and functions for HTTP (requests, responses, cookies, post/query parameters, etc).

  • a "Snap" monad interface for programming web handlers, which allows:

    • stateful access to the HTTP request and response objects.

    • monadic failure (i.e. MonadPlus/Alternative instances) for declining to handle requests and chaining handlers together.

    • early termination of the computation if you know early what you want to return and want to prevent further monadic processing.

  • useful utilities for web handlers, like file serving and gzip/zlib compression.

Building snap-core

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

cabal install

from the snap-core 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

Snap aims for 100% test coverage, and we're trying hard to stick to that.

To build the test suite, configure with --enable-tests:

$ cabal configure --enable-tests
$ cabal build

From here you can invoke the testsuite by running:

$ ./runTestsAndCoverage.sh

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

About

Core type definitions (Snap monad, HTTP types, etc) and utilities for web handlers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 97.6%
  • CSS 1.6%
  • Other 0.8%