Skip to content
Newer
Older
100644 75 lines (43 sloc) 2.08 KB
a66d2f4 @gregorycollins Bump version # in Starter
gregorycollins authored May 23, 2010
1 Snap Framework Core
2 ===================
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 18, 2010
3
4 This is the first developer prerelease of the Snap Framework Core library. For
5 more information about Snap, read the `README.SNAP.md` or visit the Snap
6 project website at http://www.snapframework.com/.
7
8 Snap is a nascent web framework for Haskell, based on iteratee I/O (as
9 [popularized by Oleg
bad2394 @gregorycollins Snap-core: improve haddock
gregorycollins authored Apr 13, 2010
10 Kiselyov](http://okmij.org/ftp/Streams.html#iteratee)).
11
12
13 ## Library contents
14
15 This is the `snap-core` library, which contains:
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 19, 2010
16
17 * primitive types and functions for HTTP (requests, responses, cookies,
bad2394 @gregorycollins Snap-core: improve haddock
gregorycollins authored Apr 13, 2010
18 post/query parameters, etc).
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 19, 2010
19
bad2394 @gregorycollins Snap-core: improve haddock
gregorycollins authored Apr 13, 2010
20 * type aliases and helper functions for Iteratee I/O.
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 19, 2010
21
22 * a "Snap" monad interface, inspired by
23 [happstack's](http://happstack.com/index.html), for programming web
24 handlers, which allows:
25
bad2394 @gregorycollins Snap-core: improve haddock
gregorycollins authored Apr 13, 2010
26 * stateful access to the HTTP request and response objects.
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 19, 2010
27
28 * monadic failure (i.e. MonadPlus/Alternative instances) for declining to
bad2394 @gregorycollins Snap-core: improve haddock
gregorycollins authored Apr 13, 2010
29 handle requests and chaining handlers together.
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 19, 2010
30
31 * early termination of the computation if you know early what you want to
bad2394 @gregorycollins Snap-core: improve haddock
gregorycollins authored Apr 13, 2010
32 return and want to prevent further monadic processing.
33
34 * Some useful utilities for web handlers, including gzip/zlib compression.
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 19, 2010
35
36
37 Building snap-core
bad2394 @gregorycollins Snap-core: improve haddock
gregorycollins authored Apr 13, 2010
38 ===================
d2e0294 @gregorycollins Commit the new re-structured snap-core
gregorycollins authored Mar 19, 2010
39
40 The snap-core library is built using [Cabal](http://www.haskell.org/cabal/) and
41 [Hackage](http://hackage.haskell.org/packages/hackage.html). Just run
42
43 cabal install
44
45 from the `snap-core` toplevel directory.
46
47
48 ## Building the Haddock Documentation
49
50 The haddock documentation can be built using the supplied `haddock.sh` shell
51 script:
52
53 ./haddock.sh
54
55 The docs get put in `dist/doc/html/`.
56
57
58 ## Building the testsuite
59
60 Snap is still in its very early stages, so most of the "action" (and a big
61 chunk of the code) right now is centred on the test suite. Snap aims for 100%
62 test coverage, and we're trying hard to stick to that.
63
64 To build the test suite, `cd` into the `test/` directory and run
65
66 $ cabal configure
67 $ cabal build
68
69 From here you can invoke the testsuite by running:
70
71 $ ./runTestsAndCoverage.sh
72
73
74 The testsuite generates an `hpc` test coverage report in `test/dist/hpc`.
Something went wrong with that request. Please try again.