summaryrefslogtreecommitdiff
path: root/src/Erebos/State.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Erebos/State.hs')
-rw-r--r--src/Erebos/State.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Erebos/State.hs b/src/Erebos/State.hs
index fa58118..0f0adbe 100644
--- a/src/Erebos/State.hs
+++ b/src/Erebos/State.hs
@@ -120,7 +120,7 @@ updateLocalHead_ f = updateLocalHead (fmap (,()) . f)
instance (HeadType a, MonadIO m) => MonadHead a (ReaderT (Head a) m) where
updateLocalHead f = do
h <- ask
- snd <$> updateHead h f
+ snd <$> updateHead' h (\h' -> local (const h') (f $ headStoredObject h'))
newtype LocalHeadT h m a = LocalHeadT { runLocalHeadT :: Storage -> Stored h -> m ( a, Stored h ) }