1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Eta-expand cacheInsert.

This commit is contained in:
Rob Rix 2017-12-20 16:16:50 -05:00
parent 2b6e3974c2
commit 59f4107263

View File

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