mirror of
https://github.com/github/semantic.git
synced 2024-12-22 06:11:49 +03:00
📝 modifyCache.
This commit is contained in:
parent
250551d39d
commit
1a52fd9c7a
@ -50,5 +50,6 @@ instance (State (Cache (LocationFor v) t v) :< fs) => MonadCacheOut t v (Eff fs)
|
||||
getCache = get
|
||||
putCache = put
|
||||
|
||||
-- | Modify the current out-cache using a given function.
|
||||
modifyCache :: MonadCacheOut t v m => (Cache (LocationFor v) t v -> Cache (LocationFor v) t v) -> m ()
|
||||
modifyCache f = fmap f getCache >>= putCache
|
||||
|
Loading…
Reference in New Issue
Block a user