snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

0.6 branch doesn't build by default #13

Closed spockz closed 13 years ago

spockz commented 13 years ago

But this patch fixes that problem. Probably this should be fixed in data-lens.

diff --git a/examples/App.hs b/examples/App.hs
index 5707d0f..cd9f798 100644
--- a/examples/App.hs
+++ b/examples/App.hs
@@ -25,7 +25,7 @@ data App = App

 type AppHandler = Handler App App

-makeLens ''App
+makeLenses ''App

 instance HasHeist App where
     heistLens = subSnaplet heist
diff --git a/src/Snap/Snaplet/Internal/Types.hs b/src/Snap/Snaplet/Internal/Types.hs
index 7c8e32f..8e66d98 100644
--- a/src/Snap/Snaplet/Internal/Types.hs
+++ b/src/Snap/Snaplet/Internal/Types.hs
@@ -68,7 +68,8 @@ instance Functor Snaplet where
     fmap f (Snaplet c v) = (Snaplet c (f v))

-makeLenses [''SnapletConfig, ''Snaplet]
+makeLenses ''SnapletConfig
+makeLenses ''Snaplet

 ------------------------------------------------------------------------------
@@ -280,7 +281,7 @@ newtype Initializer b v a =
                        a)
   deriving (Applicative, Functor, Monad, MonadIO)

-makeLenses [''InitializerState]
+makeLenses ''InitializerState

 iConfig :: Initializer b v SnapletConfig
mightybyte commented 13 years ago

Oops, I forgot to push some outstanding changes I had in data-lens-template. It should work now.