1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

📝 modifyCache.

This commit is contained in:
Rob Rix 2017-12-21 10:46:16 -05:00
parent 250551d39d
commit 1a52fd9c7a

View File

@ -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