packages feed

snap-loader-static (empty) → 0.9.0

raw patch · 7 files changed

+178/−0 lines, 7 filesdep +basedep +template-haskellsetup-changed

Dependencies added: base, template-haskell

Files

+ CONTRIBUTORS view
@@ -0,0 +1,6 @@+Ozgun Ataman <ozataman@gmail.com>+Doug Beardsley <mightybyte@gmail.com>+Gregory Collins <greg@gregorycollins.net>+Carl Howells <chowells79@gmail.com>+Chris Smith <cdsmith@gmail.com>+Jurriën Stutterheim <j.stutterheim@me.com>
+ LICENSE view
@@ -0,0 +1,27 @@+Copyright (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.
+ README.SNAP.md view
@@ -0,0 +1,42 @@+Snap 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
+ README.md view
@@ -0,0 +1,33 @@+Snap 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/`.+
+ Setup.hs view
@@ -0,0 +1,3 @@+import Distribution.Simple++main = defaultMain
+ snap-loader-static.cabal view
@@ -0,0 +1,40 @@+name:           snap-loader-static+version:        0.9.0+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.8++  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+
+ src/Snap/Loader/Static.hs view
@@ -0,0 +1,27 @@+{-# 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) |]