Giter Site home page Giter Site logo

complyue / snap-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snapframework/snap-core

0.0 2.0 0.0 1.93 MB

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

Home Page: http://snapframework.com/

License: BSD 3-Clause "New" or "Revised" License

Haskell 97.67% C 0.10% CSS 1.53% Shell 0.70% HTML 0.01%

snap-core's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.