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:
parent
b060a7a83a
commit
23cc1eafc4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user