[commit: ghc] wip/nfs-locking: Drop redundant newCache. (57c623d)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:22:05 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/57c623dbc3e8eed480ed5b0812aa8282bea22064/ghc
>---------------------------------------------------------------
commit 57c623dbc3e8eed480ed5b0812aa8282bea22064
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Fri Feb 19 00:30:00 2016 +0000
Drop redundant newCache.
See #210.
>---------------------------------------------------------------
57c623dbc3e8eed480ed5b0812aa8282bea22064
src/Oracles/ModuleFiles.hs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/Oracles/ModuleFiles.hs b/src/Oracles/ModuleFiles.hs
index 391990e..d8b1ae7 100644
--- a/src/Oracles/ModuleFiles.hs
+++ b/src/Oracles/ModuleFiles.hs
@@ -38,8 +38,8 @@ haskellModuleFiles stage pkg = do
return (haskellFiles, missingMods ++ map otherFileToMod otherFiles)
moduleFilesOracle :: Rules ()
-moduleFilesOracle = do
- answer <- newCache $ \(modules, dirs) -> do
+moduleFilesOracle = void $
+ addOracle $ \(ModuleFilesKey (modules, dirs)) -> do
let decodedPairs = map decodeModule modules
modDirFiles = map (bimap head sort . unzip)
. groupBy ((==) `on` fst) $ decodedPairs
@@ -55,6 +55,3 @@ moduleFilesOracle = do
return (map (fullDir -/-) found, mDir)
return $ sort [ (encodeModule d f, f) | (fs, d) <- result, f <- fs ]
-
- _ <- addOracle $ \(ModuleFilesKey query) -> answer query
- return ()
More information about the ghc-commits
mailing list