mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Eta-expand cacheInsert.
This commit is contained in:
parent
2b6e3974c2
commit
59f4107263
@ -26,7 +26,7 @@ cacheSet :: (Ord l, Ord t, Ord v, Ord (Cell l v)) => Configuration l t v -> Set
|
|||||||
cacheSet key value = Cache . Map.insert key value . unCache
|
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 :: (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 (<>)
|
cacheInsert key value = Cache . Map.insertWith (<>) key (point value) . unCache
|
||||||
|
|
||||||
|
|
||||||
instance (Eq l, Eq t, Eq1 (Cell l)) => Eq1 (Cache l t) where
|
instance (Eq l, Eq t, Eq1 (Cell l)) => Eq1 (Cache l t) where
|
||||||
|
Loading…
Reference in New Issue
Block a user