Adolfo Builes <bugs@darcs.net> writes:
> hunk ./src/Darcs/Repository/HashedRepo.hs 297
> - dropLocalCache globalCache (Ca cache) = Ca $ filter (/= globalCache) cache
> + dropGlobalCaches (Ca cache) = Ca $ filter notGlobalCache cache
> + notGlobalCache xs = case xs of
> + Cache DarcsCache.Directory _ _ -> False
> + _ -> True
You could more concisely write
repoCachesOnly (Ca cache) = Ca [ c | c@(Cache Repo _ _) <- cache ]
also in your version, the case is redundant, you can write
notGlobalCache (Cache DarcsCache.Directory _ _) = False
notGlobalCache _ = True
On the other hand, these are stylistic tweaks, and if you like to do
them, you can post a separate patch. I am pushing this one...
Yours,
Petr.
|