chore: bump serversession-backend-acid-state for acid-state 0.16.*

This commit is contained in:
Gregor Kleen 2020-03-13 13:30:48 +01:00
parent 130fbbaaf2
commit 1c95b01004
4 changed files with 81 additions and 10 deletions

View File

@ -22,10 +22,10 @@ library
hs-source-dirs: src
build-depends:
base == 4.*
, acid-state >= 0.12
, acid-state == 0.16.*
, containers
, mtl
, safecopy >= 0.8
, safecopy >= 0.8 && <0.11
, unordered-containers
, serversession == 1.0.*

View File

@ -112,6 +112,8 @@ instance SafeCopy SS.SessionMap where
instance SafeCopy (SS.SessionId sess) where
putCopy = contain . safePut . SSI.unS
getCopy = contain $ SSI.S <$> safeGet
errorTypeName _ = "SessionId"
-- | We can't @deriveSafeCopy 0 'base ''SS.Session@ due to the
@ -132,6 +134,8 @@ instance SafeCopy (SS.Decomposed sess) => SafeCopy (SS.Session sess) where
<*> safeGet
<*> get_t
<*> get_t
errorTypeName _ = "Session"
-- | We can't @deriveSafeCopy 0 'base ''ServerSessionAcidState@ due
@ -144,6 +148,8 @@ instance SafeCopy (SS.Decomposed sess) => SafeCopy (ServerSessionAcidState sess)
ServerSessionAcidState
<$> (HM.fromList <$> safeGet)
<*> (HM.fromList <$> safeGet)
errorTypeName _ = "ServerSessionAcidState"
----------------------------------------------------------------------
@ -277,22 +283,32 @@ instance SafeCopy (GetSession sess) where
putCopy (GetSession v) = contain $ safePut v
getCopy = contain $ GetSession <$> safeGet
errorTypeName _ = "GetSession"
instance SafeCopy (DeleteSession sess) where
putCopy (DeleteSession v) = contain $ safePut v
getCopy = contain $ DeleteSession <$> safeGet
errorTypeName _ = "DeleteSession"
instance SafeCopy (DeleteAllSessionsOfAuthId sess) where
putCopy (DeleteAllSessionsOfAuthId v) = contain $ safePut v
getCopy = contain $ DeleteAllSessionsOfAuthId <$> safeGet
errorTypeName _ = "DeleteAllSessionsOfAuthId"
instance SafeCopy (SS.Decomposed sess) => SafeCopy (InsertSession sess) where
putCopy (InsertSession v) = contain $ safePut v
getCopy = contain $ InsertSession <$> safeGet
errorTypeName _ = "InsertSession"
instance SafeCopy (SS.Decomposed sess) => SafeCopy (ReplaceSession sess) where
putCopy (ReplaceSession v) = contain $ safePut v
getCopy = contain $ ReplaceSession <$> safeGet
errorTypeName _ = "ReplaceSession"
type AcidContext sess =
( SS.IsSessionData sess
, SafeCopy sess
@ -321,9 +337,10 @@ instance AcidContext sess => Method (ReplaceSession sess) where
type MethodState (ReplaceSession sess) = ServerSessionAcidState sess
instance AcidContext sess => IsAcidic (ServerSessionAcidState sess) where
acidEvents =
[ QueryEvent $ \(GetSession sid) -> getSession sid
, UpdateEvent $ \(DeleteSession sid) -> deleteSession sid
, UpdateEvent $ \(DeleteAllSessionsOfAuthId authId) -> deleteAllSessionsOfAuthId authId
, UpdateEvent $ \(InsertSession session) -> insertSession session
, UpdateEvent $ \(ReplaceSession session) -> replaceSession session ]
acidEvents =
[ flip QueryEvent safeCopyMethodSerialiser $ \(GetSession sid) -> getSession sid
, flip UpdateEvent safeCopyMethodSerialiser $ \(DeleteSession sid) -> deleteSession sid
, flip UpdateEvent safeCopyMethodSerialiser $ \(DeleteAllSessionsOfAuthId authId) -> deleteAllSessionsOfAuthId authId
, flip UpdateEvent safeCopyMethodSerialiser $ \(InsertSession session) -> insertSession session
, flip UpdateEvent safeCopyMethodSerialiser $ \(ReplaceSession session) -> replaceSession session
]

View File

@ -1,4 +1,4 @@
resolver: lts-12.13
resolver: lts-15.0
packages:
- serversession
- serversession-backend-acid-state
@ -24,7 +24,7 @@ flags:
serversession-frontend-yesod:
lib-Werror: true
extra-deps:
- acid-state-0.14.3
- acid-state-0.16.0
- snap-1.1.1.0
- heist-1.1
- map-syntax-0.3

54
stack.yaml.lock Normal file
View File

@ -0,0 +1,54 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/lock_files
packages:
- completed:
hackage: acid-state-0.16.0@sha256:a5640fd8d99bdb5f152476a2ae56cc8eb81864b280c8ec7d1387e81296ed844d,6190
pantry-tree:
size: 13678
sha256: c6e4b7f00d2a500e6286beafe3a2da7ba898a9ea31f5744df57cdce8a8f5890f
original:
hackage: acid-state-0.16.0
- completed:
hackage: snap-1.1.1.0@sha256:3b6301b66f244074d1d7a87173cc70871df1df84b3a86bba5e996422d5e73f45,9093
pantry-tree:
size: 5743
sha256: 23a8899b96ab2dd080328b35f047c057c06ff1dc31a73b724a7a69ba3f5db374
original:
hackage: snap-1.1.1.0
- completed:
hackage: heist-1.1@sha256:20187de15ef630f8f6debc1cc22cacefb55ddf8864749294bfe2b79a831cad8d,8722
pantry-tree:
size: 7354
sha256: 977c0818628cc92775afbf063032e308e55e29e85eaf6289e955dcdcd80b563f
original:
hackage: heist-1.1
- completed:
hackage: map-syntax-0.3@sha256:ca8b449615fa57419c16a5e98844624a6ac758692b87b3cfae8c74c87c56f1b2,2420
pantry-tree:
size: 558
sha256: c196bee0433f9540e4251ebd1be06d802ff7cc4931e6f0aedc38babd28683a3c
original:
hackage: map-syntax-0.3
- completed:
hackage: pwstore-fast-2.4.4@sha256:9b6a37510d8b9f37f409a8ab3babac9181afcaaa3fce8ba1c131a7ed3de30698,1351
pantry-tree:
size: 270
sha256: ff4a44ede62515efe5cd366a5803f7183c811c4a0cf56eea88da94181c4844c0
original:
hackage: pwstore-fast-2.4.4
- completed:
hackage: xmlhtml-0.2.5.2@sha256:3f0990f725551985d777e8edb5563fe99aee998f1fde6a7633f720f76df54701,46997
pantry-tree:
size: 61835
sha256: bb1bd95db3738e18d112bbc9724510ee64a51b7eda61494507f4957c5e2281f6
original:
hackage: xmlhtml-0.2.5.2
snapshots:
- completed:
size: 488576
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/15/0.yaml
sha256: e4b6a87b47ec1cf63a7f1a0884a3b276fce2b0d174a10e8753c4f618e7983568
original: lts-15.0