@@ -54,7 +54,9 @@ makeStore :: Bool -- ^ Use in-memory caching
5454 -> FilePath -- ^ Directory to use for hard disk storage
5555 -> IO Store -- ^ Store
5656makeStore inMemory directory = do
57− lru <- if inMemory then Just <$> LRU.newAtomicLRU storeLRUSize else return Nothing
57+ lru <- if inMemory
58+ then Just <$> LRU.newAtomicLRU storeLRUSize
59+ else return Nothing
5860 return Store
5961 { storeDirectory = directory
6062 , storeLRU = lru
@@ -63,7 +65,7 @@ makeStore inMemory directory = do
6365-- | Auxiliary: add an item to the map
6466--
6567cacheInsert :: (Binary a, Typeable a) => Store -> FilePath -> a -> IO ()
66−cacheInsert (Store _ Nothing) _ _ = return ()
68+cacheInsert (Store _ Nothing) _ _ = return ()
6769cacheInsert (Store _ (Just lru)) path value =
6870 LRU.insert path (Storable value) lru
6971
@@ -75,10 +77,10 @@ cacheLookup (Store _ Nothing) _ = return NotFound
7577cacheLookup (Store _ (Just lru)) path = do
7678 res <- LRU.lookup path lru
7779 case res of
78− Nothing -> return NotFound
79− Just (Storable s) -> return $ case cast s of
80− Nothing -> WrongType (typeOf s) $ typeOf (undefined :: a)
81− Just s' -> Found s'
80+ Nothing -> return NotFound
81+ Just (Storable s) -> return $ case cast s of
82+ Nothing -> WrongType (typeOf s) $ typeOf (undefined :: a)
83+ Just s' -> Found s'
8284
8385-- | Create a path
8486--