diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-04-06 19:07:27 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-04-17 20:59:41 +0200 |
commit | 943cd6e754453f70deae6ad89c6045b42c59e9c9 (patch) | |
tree | f7ff52bfbfacacc6af7e2793c3d60651a10c71dc /src/Erebos/State.hs | |
parent | d684bc2b012e23e3cc0dfa1195a74abac661b926 (diff) |
Chatroom service
Diffstat (limited to 'src/Erebos/State.hs')
-rw-r--r-- | src/Erebos/State.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Erebos/State.hs b/src/Erebos/State.hs index 1f0bf7d..324127a 100644 --- a/src/Erebos/State.hs +++ b/src/Erebos/State.hs @@ -86,6 +86,8 @@ instance SharedType (Maybe ComposedIdentity) where class (MonadIO m, MonadStorage m) => MonadHead a m where updateLocalHead :: (Stored a -> m (Stored a, b)) -> m b + getLocalHead :: m (Stored a) + getLocalHead = updateLocalHead $ \x -> return (x, x) updateLocalHead_ :: MonadHead a m => (Stored a -> m (Stored a)) -> m () updateLocalHead_ f = updateLocalHead (fmap (,()) . f) |