snap 0.14.0.5 → 0.14.0.6
raw patch · 11 files changed
+63/−21 lines, 11 filesdep +eitherdep −errorsdep ~aesondep ~cerealdep ~lensPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: either
Dependencies removed: errors
Dependency ranges changed: aeson, cereal, lens, vector
API changes (from Hackage documentation)
- Snap.Snaplet: snapletConfig :: Lens' (Snaplet s_aunM) SnapletConfig
+ Snap.Snaplet: snapletConfig :: Lens' (Snaplet s_avfH) SnapletConfig
- Snap.Snaplet: snapletValue :: Lens' (Snaplet s_aunM) s_aunM
+ Snap.Snaplet: snapletValue :: Lens' (Snaplet s_avfH) s_avfH
Files
- CHANGELOG.md +4/−0
- project_template/default/foo.cabal +1/−1
- project_template/tutorial/foo.cabal +1/−1
- snap.cabal +6/−5
- src/Snap/Snaplet/Auth/Handlers.hs +4/−1
- src/Snap/Snaplet/Auth/Handlers/Errors.hs +33/−0
- src/Snap/Snaplet/Heist/Internal.hs +1/−1
- src/Snap/Snaplet/HeistNoClass.hs +2/−1
- src/Snap/Snaplet/Internal/Initializer.hs +1/−1
- src/Snap/Snaplet/Internal/Types.hs +1/−1
- test/snap-testsuite.cabal +9/−9
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.14.0.5++* Eliminate unnecessary dependency on syb+ # 0.14.0 * Allow lens-4.8
project_template/default/foo.cabal view
@@ -42,7 +42,7 @@ else build-depends: base >= 4.4 && < 5,- lens >= 3.7.6 && < 4.12+ lens >= 3.7.6 && < 4.13 if flag(development) build-depends:
project_template/tutorial/foo.cabal view
@@ -33,7 +33,7 @@ else build-depends: base >= 4.4 && < 5,- lens >= 3.7.6 && < 4.12+ lens >= 3.7.6 && < 4.13 if impl(ghc >= 6.12.0) ghc-options: -threaded -Wall -fwarn-tabs -funbox-strict-fields -O2
snap.cabal view
@@ -1,5 +1,5 @@ name: snap-version: 0.14.0.5+version: 0.14.0.6 synopsis: Top-level package for the Snap Web Framework description: This is the top-level package for the official Snap Framework libraries.@@ -134,6 +134,7 @@ Snap.Snaplet.Auth.AuthManager Snap.Snaplet.Auth.Types Snap.Snaplet.Auth.Handlers+ Snap.Snaplet.Auth.Handlers.Errors Snap.Snaplet.Auth.SpliceHelpers Snap.Snaplet.Heist.Internal Snap.Snaplet.Internal.Initializer@@ -146,7 +147,7 @@ build-depends: MonadCatchIO-transformers >= 0.2 && < 0.4, -- Blacklist aeson versions with problems from lack of upper bounds- aeson (>= 0.6 && < 0.7) || (>= 0.7.0.4 && < 0.9),+ aeson (>= 0.6 && < 0.7) || (>= 0.7.0.4 && < 0.10), attoparsec >= 0.10 && < 0.14, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,@@ -157,7 +158,7 @@ directory >= 1.0 && < 1.3, directory-tree >= 0.11 && < 0.13, dlist >= 0.5 && < 0.8,- errors >= 1.4 && < 1.5,+ either >= 4.3 && < 4.5, filepath >= 1.1 && < 1.5, -- Blacklist bad versions of hashable hashable (>= 1.1 && < 1.2) || (>= 1.2.0.6 && <1.3),@@ -174,7 +175,7 @@ time >= 1.1 && < 1.6, transformers >= 0.2 && < 0.5, unordered-containers >= 0.1.4 && < 0.3,- vector >= 0.7.1 && < 0.11,+ vector >= 0.7.1 && < 0.12, vector-algorithms >= 0.4 && < 0.8, xmlhtml >= 0.1 && < 0.3 @@ -186,7 +187,7 @@ else build-depends: base >= 4.4 && < 5,- lens >= 3.7.6 && < 4.12+ lens >= 3.7.6 && < 4.13 extensions: BangPatterns,
src/Snap/Snaplet/Auth/Handlers.hs view
@@ -11,9 +11,11 @@ ------------------------------------------------------------------------------ import Control.Applicative-import Control.Error import Control.Monad.State+import Control.Monad.Trans.Either+import Control.Monad.Trans.Maybe import Data.ByteString (ByteString)+import Data.Maybe import Data.Serialize hiding (get) import Data.Time import Data.Text.Encoding (decodeUtf8)@@ -24,6 +26,7 @@ import Snap.Core import Snap.Snaplet import Snap.Snaplet.Auth.AuthManager+import Snap.Snaplet.Auth.Handlers.Errors import Snap.Snaplet.Auth.Types import Snap.Snaplet.Session ------------------------------------------------------------------------------
+ src/Snap/Snaplet/Auth/Handlers/Errors.hs view
@@ -0,0 +1,33 @@+-- | An internal module that copies a few select functions+-- from Control.Error.Util, as used in Snap.Snaplet.Auth.Handlers.+module Snap.Snaplet.Auth.Handlers.Errors+ ( hush+ , hushT+ , note+ , noteT+ , hoistMaybe+ ) where++import Control.Monad+import Control.Monad.Trans.Either+import Control.Monad.Trans.Maybe++-- | Suppress the 'Left' value of an 'Either'+hush :: Either a b -> Maybe b+hush = either (const Nothing) Just++-- | Suppress the 'Left' value of an 'EitherT'+hushT :: (Monad m) => EitherT a m b -> MaybeT m b+hushT = MaybeT . liftM hush . runEitherT++-- | Tag the 'Nothing' value of a 'Maybe'+note :: a -> Maybe b -> Either a b+note a = maybe (Left a) Right++-- | Tag the 'Nothing' value of a 'MaybeT'+noteT :: (Monad m) => a -> MaybeT m b -> EitherT a m b+noteT a = EitherT . liftM (note a) . runMaybeT++-- | Lift a 'Maybe' to the 'MaybeT' monad+hoistMaybe :: (Monad m) => Maybe b -> MaybeT m b+hoistMaybe = MaybeT . return
src/Snap/Snaplet/Heist/Internal.hs view
@@ -2,9 +2,9 @@ module Snap.Snaplet.Heist.Internal where import Prelude-import Control.Error import Control.Lens import Control.Monad.State+import Control.Monad.Trans.Either import qualified Data.HashMap.Strict as Map import Data.IORef import Data.List
src/Snap/Snaplet/HeistNoClass.hs view
@@ -63,15 +63,16 @@ import Prelude hiding ((.), id) import Control.Applicative import Control.Category-import Control.Error import Control.Lens import Control.Monad.Reader import Control.Monad.State+import Control.Monad.Trans.Either import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B import Data.DList (DList) import qualified Data.HashMap.Strict as Map import Data.IORef+import Data.Maybe import Data.Monoid import qualified Data.Text as T import Data.Text.Encoding
src/Snap/Snaplet/Internal/Initializer.hs view
@@ -28,13 +28,13 @@ import Prelude hiding (catch) import Control.Concurrent.MVar-import Control.Error import Control.Exception (SomeException) import Control.Lens import Control.Monad import Control.Monad.CatchIO hiding (Handler) import Control.Monad.Reader import Control.Monad.State+import Control.Monad.Trans.Either import Control.Monad.Trans.Writer hiding (pass) import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as B
src/Snap/Snaplet/Internal/Types.hs view
@@ -14,11 +14,11 @@ module Snap.Snaplet.Internal.Types where import Control.Applicative-import Control.Error import Control.Lens import Control.Monad.CatchIO hiding (Handler) import Control.Monad.Reader import Control.Monad.State.Class+import Control.Monad.Trans.Either import Control.Monad.Trans.Writer hiding (pass) import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as B
test/snap-testsuite.cabal view
@@ -26,7 +26,7 @@ unix >= 2.2.0.0 && < 2.8, MonadCatchIO-transformers >= 0.2 && < 0.4,- aeson >= 0.6 && < 0.9,+ aeson >= 0.6 && < 0.10, attoparsec >= 0.10 && < 0.13, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,@@ -55,7 +55,7 @@ time >= 1.1 && < 1.5, transformers >= 0.2 && < 0.5, unordered-containers >= 0.1.4 && < 0.3,- vector >= 0.7.1 && < 0.11,+ vector >= 0.7.1 && < 0.12, vector-algorithms >= 0.4 && < 0.7, xmlhtml >= 0.1 && < 0.3 @@ -66,7 +66,7 @@ else build-depends: base >= 4.4 && < 5,- lens >= 3.7.6 && < 4.11+ lens >= 3.7.6 && < 4.13 extensions:@@ -98,7 +98,7 @@ build-depends: MonadCatchIO-transformers >= 0.2 && < 0.4,- aeson >= 0.6 && < 0.9,+ aeson >= 0.6 && < 0.10, attoparsec >= 0.10 && < 0.13, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,@@ -127,7 +127,7 @@ time >= 1.1 && < 1.5, transformers >= 0.2 && < 0.5, unordered-containers >= 0.1.4 && < 0.3,- vector >= 0.7.1 && < 0.11,+ vector >= 0.7.1 && < 0.12, vector-algorithms >= 0.4 && < 0.7, xmlhtml >= 0.1 && < 0.3 @@ -138,7 +138,7 @@ else build-depends: base >= 4.4 && < 5,- lens >= 3.7.6 && < 4.11+ lens >= 3.7.6 && < 4.13 extensions: BangPatterns,@@ -180,7 +180,7 @@ unix >= 2.2.0.0 && < 2.8, MonadCatchIO-transformers >= 0.2 && < 0.4,- aeson >= 0.6 && < 0.9,+ aeson >= 0.6 && < 0.10, attoparsec >= 0.10 && < 0.13, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,@@ -209,7 +209,7 @@ time >= 1.1 && < 1.5, transformers >= 0.2 && < 0.5, unordered-containers >= 0.1.4 && < 0.3,- vector >= 0.7.1 && < 0.11,+ vector >= 0.7.1 && < 0.12, vector-algorithms >= 0.4 && < 0.7, xmlhtml >= 0.1 && < 0.3 @@ -220,7 +220,7 @@ else build-depends: base >= 4.4 && < 5,- lens >= 3.7.6 && < 4.11+ lens >= 3.7.6 && < 4.13 extensions: