From 2b6e3974c20152ce5d99f0028478f255bd17dc7f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 20 Dec 2017 16:16:03 -0500 Subject: [PATCH] Eta-expand cacheSet. --- src/Data/Abstract/Cache.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Abstract/Cache.hs b/src/Data/Abstract/Cache.hs index 26491415e..75241601d 100644 --- a/src/Data/Abstract/Cache.hs +++ b/src/Data/Abstract/Cache.hs @@ -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 (<>)