snap-loader-static-0.9.0.1/0000755000000000000000000000000012061207574013543 5ustar0000000000000000snap-loader-static-0.9.0.1/README.md0000644000000000000000000000165612061207574015032 0ustar0000000000000000Snap Framework ============== Snap is a web framework for Haskell, based on iteratee I/O (as [popularized by Oleg Kiselyov](http://okmij.org/ftp/Streams.html#iteratee)). 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 utility project for the Snap Framework, which contains a library allowing Snap applications to run at full compiled speed with no overhead, in a way that's drop-in compatible with snap-loader-dynamic. Building snap-loader-static =========================== This library is built using [Cabal](http://www.haskell.org/cabal/) and [Hackage](http://hackage.haskell.org/packages/hackage.html). Just run cabal install from the `snap-loader-static` toplevel directory. ## Building the Haddock Documentation The haddock documentation can be built using 'cabal haddock'. The docs get put in `dist/doc/html/`. snap-loader-static-0.9.0.1/CONTRIBUTORS0000644000000000000000000000034212061207574015422 0ustar0000000000000000Ozgun Ataman Doug Beardsley Gregory Collins Carl Howells Chris Smith Jurriƫn Stutterheim snap-loader-static-0.9.0.1/LICENSE0000644000000000000000000000274512061207574014560 0ustar0000000000000000Copyright (c) 2009, Snap Framework authors (see CONTRIBUTORS) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Snap Framework authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. snap-loader-static-0.9.0.1/snap-loader-static.cabal0000644000000000000000000000175212061207574020226 0ustar0000000000000000name: snap-loader-static version: 0.9.0.1 synopsis: Snap: A Haskell Web Framework: static loader description: Snap Framework static loader license: BSD3 license-file: LICENSE author: Carl Howells maintainer: snap@snapframework.com build-type: Simple cabal-version: >= 1.8 homepage: http://snapframework.com/ category: Web, Snap extra-source-files: CONTRIBUTORS, LICENSE, README.md, README.SNAP.md Library hs-source-dirs: src exposed-modules: Snap.Loader.Static build-depends: base >= 4 && < 5, template-haskell >= 2.2 && < 2.9 if impl(ghc >= 6.12.0) ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 -fno-warn-orphans -fno-warn-unused-do-bind else ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2 -fno-warn-orphans source-repository head type: git location: git://github.com/snapframework/snap-loader-static.git snap-loader-static-0.9.0.1/Setup.hs0000644000000000000000000000005712061207574015201 0ustar0000000000000000import Distribution.Simple main = defaultMain snap-loader-static-0.9.0.1/README.SNAP.md0000644000000000000000000000227312061207574015566 0ustar0000000000000000Snap Framework -------------- Snap is a simple and fast web development framework and server written in Haskell. For more information or to download the latest version, you can visit the Snap project website at http://snapframework.com/. Snap Status and Features ------------------------ The Snap core system consists of: * a high-speed HTTP server, with an optional high-concurrency backend using the [libev](http://software.schmorp.de/pkg/libev.html) library * a sensible and clean monad for web programming * an xml-based templating system for generating HTML that allows you to bind Haskell functionality to XML tags without getting PHP-style tag soup all over your pants * a "snaplet" system for building web sites from composable pieces. Snap is currently only officially supported on Unix platforms; it has been tested on Linux and Mac OSX Snow Leopard, and is reported to work on Windows. Snap Philosophy --------------- Snap aims to be the *de facto* web toolkit for Haskell, on the basis of: * High performance * High design standards * Simplicity and ease of use, even for Haskell beginners * Excellent documentation * Robustness and high test coverage snap-loader-static-0.9.0.1/src/0000755000000000000000000000000012061207574014332 5ustar0000000000000000snap-loader-static-0.9.0.1/src/Snap/0000755000000000000000000000000012061207574015233 5ustar0000000000000000snap-loader-static-0.9.0.1/src/Snap/Loader/0000755000000000000000000000000012061207574016441 5ustar0000000000000000snap-loader-static-0.9.0.1/src/Snap/Loader/Static.hs0000644000000000000000000000175412061207574020233 0ustar0000000000000000{-# LANGUAGE TemplateHaskell #-} module Snap.Loader.Static ( loadSnapTH ) where ------------------------------------------------------------------------------ import Language.Haskell.TH (Exp, Name, Q, varE) ------------------------------------------------------------------------------ -- | This function provides a non-magical type-compatible loader for -- the one in snap-dynamic's Snap.Loader.Devel, allowing switching one -- import to provide production-mode compilation. -- -- This could be considered a TH wrapper around a function -- -- > loadSnap :: Typeable a => IO a -> (a -> IO (Snap (), IO ())) -- > -> [String] -> IO (a, Snap (), IO ()) -- -- The third argument is unused, and only present for -- type-compatibility with Snap.Loader.Devel loadSnapTH :: Q Exp -> Name -> [String] -> Q Exp loadSnapTH initializer action _additionalWatchDirs = [| do value <- $initializer (site, conf) <- $(varE action) value return (value, site, conf) |]