1
1
mirror of https://github.com/github/semantic.git synced 2025-01-04 13:34:31 +03:00

modifyStore is strict in the new store.

This commit is contained in:
Rob Rix 2018-03-12 15:21:28 -04:00
parent b060a7a83a
commit 23cc1eafc4

View File

@ -50,7 +50,9 @@ class Monad m => MonadStore value m | m -> value where
-- | Update the heap.
modifyStore :: MonadStore value m => (StoreFor value -> StoreFor value) -> m ()
modifyStore f = getStore >>= putStore . f
modifyStore f = do
s <- getStore
putStore $! f s
-- | Write a value to the given 'Address' in the 'Store'.
assign :: ( Ord (LocationFor value)