Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Export ISessionManager internals from its own module"

This reverts commit 987be67.
  • Loading branch information...
commit e7699e90ddd32abe0aa0d635abdeae30f01678d4 1 parent 01dfea1
@gregorycollins gregorycollins authored
View
50 snap.cabal
@@ -81,35 +81,35 @@ Library
exposed-modules:
Snap,
- Snap.Snaplet
- Snap.Snaplet.Heist
- Snap.Snaplet.Auth
- Snap.Snaplet.Auth.Backends.JsonFile
- Snap.Snaplet.Config
- Snap.Snaplet.Session
- Snap.Snaplet.Session.Common
- Snap.Snaplet.Session.SessionManager
+ Snap.Snaplet,
+ Snap.Snaplet.Heist,
+ Snap.Snaplet.Auth,
+ Snap.Snaplet.Auth.Backends.JsonFile,
+ Snap.Snaplet.Config,
+ Snap.Snaplet.Session,
+ Snap.Snaplet.Session.Common,
Snap.Snaplet.Session.Backends.CookieSession
other-modules:
- Control.Access.RoleBased.Checker
- Control.Access.RoleBased.Role
- Control.Access.RoleBased.Types
- Control.Access.RoleBased.Internal.Role
- Control.Access.RoleBased.Internal.RoleMap
- Control.Access.RoleBased.Internal.Rule
- Control.Access.RoleBased.Internal.Types
- Snap.Snaplet.Auth.AuthManager
- Snap.Snaplet.Auth.Types
- Snap.Snaplet.Auth.Handlers
- Snap.Snaplet.Auth.SpliceHelpers
- Snap.Snaplet.HeistNoClass
- Snap.Snaplet.Internal.Initializer
- Snap.Snaplet.Internal.LensT
- Snap.Snaplet.Internal.Lensed
- Snap.Snaplet.Internal.RST
+ Control.Access.RoleBased.Checker,
+ Control.Access.RoleBased.Role,
+ Control.Access.RoleBased.Types,
+ Control.Access.RoleBased.Internal.Role,
+ Control.Access.RoleBased.Internal.RoleMap,
+ Control.Access.RoleBased.Internal.Rule,
+ Control.Access.RoleBased.Internal.Types,
+ Snap.Snaplet.Auth.AuthManager,
+ Snap.Snaplet.Auth.Types,
+ Snap.Snaplet.Auth.Handlers,
+ Snap.Snaplet.Auth.SpliceHelpers,
+ Snap.Snaplet.HeistNoClass,
+ Snap.Snaplet.Internal.Initializer,
+ Snap.Snaplet.Internal.LensT,
+ Snap.Snaplet.Internal.Lensed,
+ Snap.Snaplet.Internal.RST,
Snap.Snaplet.Internal.Types
- Snap.Snaplet.Session.SecureCookie
+ Snap.Snaplet.Session.SecureCookie,
+ Snap.Snaplet.Session.SessionManager
if !os(windows)
build-depends:
View
10 src/Snap/Snaplet/Session.hs
@@ -1,5 +1,6 @@
module Snap.Snaplet.Session
- ( SessionManager
+ ( SessionManager(..)
+ , ISessionManager(..)
, withSession
, commitSession
, setInSession
@@ -10,7 +11,6 @@ module Snap.Snaplet.Session
, resetSession
, touchSession
- -- * Utilities Exported For Convenience
, module Snap.Snaplet.Session.Common
, module Snap.Snaplet.Session.SecureCookie
) where
@@ -18,14 +18,14 @@ module Snap.Snaplet.Session
------------------------------------------------------------------------------
import Control.Monad.State
import Data.Lens.Lazy
-import Data.Text (Text)
+import Data.Text (Text)
import Snap.Core
------------------------------------------------------------------------------
import Snap.Snaplet
import Snap.Snaplet.Session.Common
import Snap.Snaplet.Session.SecureCookie
-import Snap.Snaplet.Session.SessionManager
- ( ISessionManager(..), SessionManager(..) )
+import Snap.Snaplet.Session.SessionManager
+ ( SessionManager(..), ISessionManager(..) )
import qualified Snap.Snaplet.Session.SessionManager as SM
------------------------------------------------------------------------------
View
20 src/Snap/Snaplet/Session/Backends/CookieSession.hs
@@ -1,7 +1,7 @@
------------------------------------------------------------------------------
+{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-{-# LANGUAGE OverloadedStrings #-}
module Snap.Snaplet.Session.Backends.CookieSession
( initCookieSessionManager
@@ -10,21 +10,19 @@ module Snap.Snaplet.Session.Backends.CookieSession
------------------------------------------------------------------------------
import Control.Applicative
import Control.Monad.Reader
-import Data.ByteString (ByteString)
+import Data.ByteString (ByteString)
import Data.Generics
-import Data.HashMap.Strict (HashMap)
-import qualified Data.HashMap.Strict as HM
-import Data.Hashable (Hashable)
-import Data.Serialize (Serialize)
-import qualified Data.Serialize as S
-import Data.Text (Text)
-import Snap.Core (Snap)
+import Data.HashMap.Strict (HashMap)
+import qualified Data.HashMap.Strict as HM
+import Data.Hashable (Hashable)
+import Data.Serialize (Serialize)
+import qualified Data.Serialize as S
+import Data.Text (Text)
+import Snap.Core (Snap)
import Web.ClientSession
------------------------------------------------------------------------------
import Snap.Snaplet
import Snap.Snaplet.Session
-import Snap.Snaplet.Session.SessionManager
--------------------------------------------------------------------------------
------------------------------------------------------------------------------
View
24 src/Snap/Snaplet/Session/SessionManager.hs
@@ -1,30 +1,16 @@
{-# LANGUAGE ExistentialQuantification #-}
-{-| This module is meant to be used mainly by Session backend
-developers, who would naturally need access to ISessionManager class
-internals. You can also use it if you need low-level access to the
-backend functionality.-}
-
module Snap.Snaplet.Session.SessionManager where
--------------------------------------------------------------------------------
import Data.Text (Text)
-import Prelude hiding (lookup)
--------------------------------------------------------------------------------
-import Snap.Core (Snap)
--------------------------------------------------------------------------------
+import Prelude hiding (lookup)
+import Snap.Core (Snap)
--- | Any Haskell record that is a member of the 'ISessionManager'
--- typeclass can be stuffed inside a 'SessionManager' to enable all
--- session-related functionality.
---
--- To use sessions in your application, just find a Backend that would
--- produce one for you inside of your 'Initializer'. See
--- 'initCookieSessionManager' in
--- 'Snap.Snaplet.Session.Backends.CookieSession' for a built-in option
--- that would get you started.
+-- | Any Haskell record that is a member of the 'ISessionManager' typeclass
+-- can be stuffed inside a 'SessionManager' to enable all session-related
+-- functionality.
data SessionManager = forall a. ISessionManager a => SessionManager a
Please sign in to comment.
Something went wrong with that request. Please try again.