Permalink
Browse files

Merge branch 'master' into 0.10

Conflicts:
	snap.cabal
  • Loading branch information...
2 parents a8af6ae + 22691b4 commit 2641ff55d8699aef4dac099670d32f0e12b1ba26 @mightybyte mightybyte committed Aug 17, 2012
@@ -1,6 +1,18 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
+{-
+
+NOTE: Don't modify this file unless you know what you are doing. If you are
+new to snap, start with Site.hs and Application.hs. This file contains
+boilerplate needed for dynamic reloading and is not meant for general
+consumption.
+
+Occasionally if we modify the way the dynamic reloader works and you want to
+upgrade, you might have to swap out this file for a newer version. But in
+most cases you'll never need to modify this code.
+
+-}
module Main where
------------------------------------------------------------------------------
@@ -54,8 +54,11 @@ generates a single response. From now on, when we talk about state this is
what we are talking about. If you need global application state, you have to
use a thread-safe construct such as an MVar or IORef.
-This post is written in literate Haskell, so first we need to get imports out
-of the way.
+This post is written in literate Haskell. It uses a small external module
+called Part2 that is [available
+here](https://github.com/snapframework/snap/blob/master/project_template/tutorial/src/Part2.lhs).
+You can also install the full code in the current directory with the command
+`snap init tutorial`. First we need to get imports out of the way.
> {-# LANGUAGE TemplateHaskell #-}
> {-# LANGUAGE OverloadedStrings #-}
@@ -267,10 +270,10 @@ Now all we need is a simple main function to serve our application.
This completes a full working application. We did leave out a little dummy
code for the Foo and Bar snaplets. This code is included in Part2.hs. For
more information look in our [API
-documentation](http://hackage.haskell.org/packages/archive/snap/0.6.0.2/doc/html/Snap-Snaplet.html).
-No really, that wasn't a joke. The API docs are written as prose. It is
-written to be very easy to read, while having the benefit of including all the
-actual type signatures.
+documentation](http://hackage.haskell.org/package/snap), specifically the
+Snap.Snaplet module. No really, that wasn't a joke. The API docs are written
+as prose. They should be very easy to read, while having the benefit of
+including all the actual type signatures.
Filesystem Data and Automatic Installation
==========================================
@@ -349,5 +352,11 @@ including a section like the following in snaplet-killerapp.cabal:
Now whenever your snaplet is used, its filesystem data will be automagically
copied into the local project that is using it, whenever the application is
-run and it sees that the files don't already exist.
+run and it sees that the snaplet's directory does not already exist. If the
+user upgrades to a new version of the snaplet and the new version made changes
+to the filesystem resources, those resources will NOT be automatically copied
+in by default. Resource installation *only* happens when the `snaplets/foo`
+directory does not exist. If you want to get the latest version of the
+filesystem resources, remove the `snaplets/foo` directory, and restart your
+app.
View
@@ -1,7 +1,27 @@
name: snap
version: 0.10.0
-synopsis: Snap: A Haskell Web Framework: project starter executable and glue code library
-description: Snap Framework project starter executable and glue code library
+synopsis: Top-level package for the Snap Web Framework
+description:
+ This is the top-level package for the official Snap Framework libraries.
+ It includes:
+ .
+ * The Snaplets API
+ .
+ * The \"snap\" executable program for generating starter projects
+ .
+ * Snaplets for sessions, authentication, and templates
+ .
+ To get started, issue the following sequence of commands:
+ .
+ @$ cabal install snap
+ $ mkdir myproject
+ $ cd myproject
+ $ snap init@
+ .
+ If you have trouble or any questions, see our FAQ page
+ (<http://snapframework.com/faq>) or the documentation
+ (<http://snapframework.com/docs>).
+
license: BSD3
license-file: LICENSE
author: Ozgun Ataman, Doug Beardsley, Gregory Collins, Carl Howells, Chris Smith
@@ -35,6 +35,7 @@ import Snap.Snaplet.Heist
-- This adds the following splices:
-- \<ifLoggedIn\>
-- \<ifLoggedOut\>
+-- \<loggedInUser\>
addAuthSplices
:: HasHeist b
=> Lens b (Snaplet (AuthManager b))

0 comments on commit 2641ff5

Please sign in to comment.