mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Eta-expand cacheSet.
This commit is contained in:
parent
5488187caf
commit
2b6e3974c2
@ -23,7 +23,7 @@ cacheLookup :: (Ord l, Ord t, Ord v, Ord (Cell l v)) => Configuration l t v -> C
|
||||
cacheLookup key = Map.lookup key . unCache
|
||||
|
||||
cacheSet :: (Ord l, Ord t, Ord v, Ord (Cell l v)) => Configuration l t v -> Set (v, Store l v) -> Cache l t v -> Cache l t v
|
||||
cacheSet = (((Cache .) . (. unCache)) .) . Map.insert
|
||||
cacheSet key value = Cache . Map.insert key value . unCache
|
||||
|
||||
cacheInsert :: (Ord l, Ord t, Ord v, Ord (Cell l v)) => Configuration l t v -> (v, Store l v) -> Cache l t v -> Cache l t v
|
||||
cacheInsert = (((Cache .) . (. unCache)) .) . (. point) . Map.insertWith (<>)
|
||||
|
Loading…
Reference in New Issue
Block a user