[commit: ghc] wip/nfs-locking: Minor revision. (d396ba3)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:05:22 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/d396ba3d8f4d2ce6e15d3149404fbb94118bddc3/ghc
>---------------------------------------------------------------
commit d396ba3d8f4d2ce6e15d3149404fbb94118bddc3
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Fri Feb 26 01:54:51 2016 +0000
Minor revision.
>---------------------------------------------------------------
d396ba3d8f4d2ce6e15d3149404fbb94118bddc3
src/Oracles/Dependencies.hs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Oracles/Dependencies.hs b/src/Oracles/Dependencies.hs
index b34535b..aa54d86 100644
--- a/src/Oracles/Dependencies.hs
+++ b/src/Oracles/Dependencies.hs
@@ -1,10 +1,11 @@
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
module Oracles.Dependencies (dependencies, dependenciesOracle) where
-import Base
import Control.Monad.Trans.Maybe
import qualified Data.HashMap.Strict as Map
+import Base
+
newtype DependenciesKey = DependenciesKey (FilePath, FilePath)
deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
@@ -28,10 +29,9 @@ dependencies path obj = do
-- Oracle for 'path/dist/.dependencies' files
dependenciesOracle :: Rules ()
-dependenciesOracle = do
+dependenciesOracle = void $ do
deps <- newCache $ \file -> do
putOracle $ "Reading dependencies from " ++ file ++ "..."
contents <- map words <$> readFileLines file
return . Map.fromList $ map (\(x:xs) -> (x, xs)) contents
- _ <- addOracle $ \(DependenciesKey (file, obj)) -> Map.lookup obj <$> deps file
- return ()
+ addOracle $ \(DependenciesKey (file, obj)) -> Map.lookup obj <$> deps file
More information about the ghc-commits
mailing list