Add useful instances to some core structures.
This commit is contained in:
parent
235bdc9a70
commit
b7a063e1ee
@ -30,7 +30,7 @@ module Web.ServerSession.Core.Internal
|
|||||||
, saveSession
|
, saveSession
|
||||||
, SaveSessionToken(..)
|
, SaveSessionToken(..)
|
||||||
, invalidateIfNeeded
|
, invalidateIfNeeded
|
||||||
, DecomposedSession
|
, DecomposedSession(..)
|
||||||
, decomposeSession
|
, decomposeSession
|
||||||
, saveSessionOnDb
|
, saveSessionOnDb
|
||||||
, toSessionMap
|
, toSessionMap
|
||||||
@ -383,7 +383,9 @@ cookieExpires state session =
|
|||||||
|
|
||||||
-- | Opaque token containing the necessary information for
|
-- | Opaque token containing the necessary information for
|
||||||
-- 'saveSession' to save the session.
|
-- 'saveSession' to save the session.
|
||||||
data SaveSessionToken = SaveSessionToken (Maybe Session) UTCTime
|
data SaveSessionToken =
|
||||||
|
SaveSessionToken (Maybe Session) UTCTime
|
||||||
|
deriving (Eq, Show, Typeable)
|
||||||
|
|
||||||
|
|
||||||
-- | Save the session on the storage backend. A
|
-- | Save the session on the storage backend. A
|
||||||
@ -430,7 +432,7 @@ data DecomposedSession =
|
|||||||
{ dsAuthId :: !(Maybe ByteString)
|
{ dsAuthId :: !(Maybe ByteString)
|
||||||
, dsForceInvalidate :: !ForceInvalidate
|
, dsForceInvalidate :: !ForceInvalidate
|
||||||
, dsSessionMap :: !SessionMap
|
, dsSessionMap :: !SessionMap
|
||||||
} deriving (Show, Typeable)
|
} deriving (Eq, Show, Typeable)
|
||||||
|
|
||||||
|
|
||||||
-- | Decompose a session (see 'DecomposedSession').
|
-- | Decompose a session (see 'DecomposedSession').
|
||||||
@ -524,4 +526,4 @@ data ForceInvalidate =
|
|||||||
| DoNotForceInvalidate
|
| DoNotForceInvalidate
|
||||||
-- ^ Do not force invalidate. Invalidate only if
|
-- ^ Do not force invalidate. Invalidate only if
|
||||||
-- automatically. This is the default.
|
-- automatically. This is the default.
|
||||||
deriving (Eq, Ord, Show, Read, Enum, Typeable)
|
deriving (Eq, Ord, Show, Read, Bounded, Enum, Typeable)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user