packages feed

snap 1.0.0.0 → 1.0.0.1

raw patch · 4 files changed

+14/−5 lines, 4 filesdep ~HUnitdep ~QuickCheckdep ~aesonPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: HUnit, QuickCheck, aeson, base, directory, lens

API changes (from Hackage documentation)

- Snap.Snaplet.Auth.Backends.JsonFile: instance Data.Aeson.Types.Class.FromJSON Snap.Snaplet.Auth.Backends.JsonFile.UserCache
- Snap.Snaplet.Auth.Backends.JsonFile: instance Data.Aeson.Types.Class.FromJSON Snap.Snaplet.Auth.Backends.JsonFile.UserIdCache
- Snap.Snaplet.Auth.Backends.JsonFile: instance Data.Aeson.Types.Class.ToJSON Snap.Snaplet.Auth.Backends.JsonFile.UserCache
- Snap.Snaplet.Auth.Backends.JsonFile: instance Data.Aeson.Types.Class.ToJSON Snap.Snaplet.Auth.Backends.JsonFile.UserIdCache
+ Snap.Snaplet.Auth.Backends.JsonFile: instance Data.Aeson.Types.FromJSON.FromJSON Snap.Snaplet.Auth.Backends.JsonFile.UserCache
+ Snap.Snaplet.Auth.Backends.JsonFile: instance Data.Aeson.Types.ToJSON.ToJSON Snap.Snaplet.Auth.Backends.JsonFile.UserCache
- Snap.Snaplet: snapletConfig :: forall s_ay5V. Lens' (Snaplet s_ay5V) SnapletConfig
+ Snap.Snaplet: snapletConfig :: forall s_aybc. Lens' (Snaplet s_aybc) SnapletConfig
- Snap.Snaplet: snapletValue :: forall s_ay5V. Lens' (Snaplet s_ay5V) s_ay5V
+ Snap.Snaplet: snapletValue :: forall s_aybc. Lens' (Snaplet s_aybc) s_aybc

Files

README.md view
@@ -65,7 +65,7 @@  ## Roadmap to Understanding Snaplets -1. Read `Tutorial.lhs` which is in the `project_template/tutorial/src` directory of the `snap-template` package.+1. Read `Tutorial.lhs` which is in the `project_template/tutorial/src` directory of the `snap-templates` package. 2. Generate and read the haddock docs. 3. The test code has the nice property that it actually functions as a pretty good example app and covers a lot of the use cases. 4. If you're interested in the implementation, read design.md.
snap.cabal view
@@ -1,5 +1,5 @@ name:           snap-version:        1.0.0.0+version:        1.0.0.1 synopsis:       Top-level package for the Snap Web Framework description:     This is the top-level package for the official Snap Framework libraries.@@ -11,7 +11,7 @@     .     To get started, issue the following sequence of commands:     .-    @$ cabal install snap snap-template+    @$ cabal install snap snap-templates     $ mkdir myproject     $ cd myproject     $ snap init@@@ -21,7 +21,7 @@     (<http://snapframework.com/docs>).     .     Note: since version 1.0, the \"snap\" executable program for generating-    starter projects is provided by the @snap-template@ package.+    starter projects is provided by the @snap-templates@ package.  license:        BSD3 license-file:   LICENSE@@ -103,7 +103,7 @@     Snap.Snaplet.Session.SecureCookie    build-depends:-    aeson                     >= 0.6      && < 0.12,+    aeson                     >= 0.6      && < 1.1,     attoparsec                >= 0.10     && < 0.14,     base                      >= 4        && < 5,     bytestring                >= 0.9.1    && < 0.11,
src/Snap/Snaplet/Auth/Backends/JsonFile.hs view
@@ -89,11 +89,15 @@ ------------------------------------------------------------------------------ type UserIdCache = Map UserId AuthUser +#if !MIN_VERSION_aeson(1,0,0)+-- In aeson >= 1 these instances are not needed because we have+-- derived ToJSONKey/FromJSONKey instances for UserId. instance ToJSON UserIdCache where   toJSON m = toJSON $ HM.toList m  instance FromJSON UserIdCache where   parseJSON = fmap HM.fromList . parseJSON+#endif  ------------------------------------------------------------------------------ type LoginUserCache = Map Text UserId
src/Snap/Snaplet/Auth/Types.hs view
@@ -3,6 +3,7 @@ {-# LANGUAGE ExistentialQuantification  #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings          #-}+{-# LANGUAGE StandaloneDeriving         #-}  module Snap.Snaplet.Auth.Types where @@ -113,6 +114,10 @@ newtype UserId = UserId { unUid :: Text }   deriving ( Read, Show, Ord, Eq, FromJSON, ToJSON, Hashable ) +#if MIN_VERSION_aeson(1,0,0)+deriving instance FromJSONKey UserId+deriving instance ToJSONKey UserId+#endif  ------------------------------------------------------------------------------ -- | This will be replaced by a role-based permission system.