[commit: ghc] wip/nfs-locking: Fix warnings (e8abab2)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 01:19:50 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/e8abab220113b10ef22e1080d7771216b2488b0b/ghc

>---------------------------------------------------------------

commit e8abab220113b10ef22e1080d7771216b2488b0b
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Jul 11 18:07:53 2017 +0100

    Fix warnings
    
    See #358


>---------------------------------------------------------------

e8abab220113b10ef22e1080d7771216b2488b0b
 src/Oracles/Dependencies.hs       |  2 +-
 src/Rules/Documentation.hs        | 13 +------------
 src/Settings/Builders/Ghc.hs      |  1 -
 src/Settings/Flavours/Quickest.hs |  1 -
 src/Settings/Packages/GhcCabal.hs |  3 ---
 5 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/src/Oracles/Dependencies.hs b/src/Oracles/Dependencies.hs
index 447df25..3aaabfa 100644
--- a/src/Oracles/Dependencies.hs
+++ b/src/Oracles/Dependencies.hs
@@ -90,7 +90,7 @@ sortPkgsByDep pkgs = do
     return $ map fst $ topSort elems
   where
     annotateInDeg es e =
-     (foldr (\e' s -> if fst e' `elem` snd e then s + 1 else s) 0 es, e)
+     (foldr (\e' s -> if fst e' `elem` snd e then s + 1 else s) (0 :: Int) es, e)
     topSort [] = []
     topSort es =
       let annotated = map (annotateInDeg es) es
diff --git a/src/Rules/Documentation.hs b/src/Rules/Documentation.hs
index 5ee6818..a3a7b7c 100644
--- a/src/Rules/Documentation.hs
+++ b/src/Rules/Documentation.hs
@@ -7,14 +7,11 @@ import Flavour
 import GHC
 import Oracles.ModuleFiles
 import Oracles.PackageData
-import Oracles.Path (getTopDirectory)
 import Settings
 import Settings.Path
 import Target
 import Util
 
-import qualified System.Directory as IO
-
 haddockHtmlLib :: FilePath
 haddockHtmlLib = "inplace/lib/html/haddock-util.js"
 
@@ -23,8 +20,7 @@ haddockHtmlLib = "inplace/lib/html/haddock-util.js"
 -- files in the Shake database seems fragile and unnecessary.
 buildPackageDocumentation :: Context -> Rules ()
 buildPackageDocumentation context at Context {..} =
-    let cabalFile   = pkgCabalFile package
-        haddockFile = pkgHaddockFile context
+    let haddockFile = pkgHaddockFile context
     in when (stage == Stage1) $ do
         haddockFile %> \file -> do
             srcs <- hsSources context
@@ -43,13 +39,6 @@ buildPackageDocumentation context at Context {..} =
             let dir = takeDirectory haddockHtmlLib
             liftIO $ removeFiles dir ["//*"]
             copyDirectory "utils/haddock/haddock-api/resources/html" dir
-  where
-    excluded = Or
-        [ Test "//haddock-prologue.txt"
-        , Test "//package-data.mk"
-        , Test "//setup-config"
-        , Test "//inplace-pkg-config"
-        , Test "//build" ]
 
 -- # Make the haddocking depend on the library .a file, to ensure
 -- # that we wait until the library is fully built before we haddock it
diff --git a/src/Settings/Builders/Ghc.hs b/src/Settings/Builders/Ghc.hs
index aa6303e..9864946 100644
--- a/src/Settings/Builders/Ghc.hs
+++ b/src/Settings/Builders/Ghc.hs
@@ -2,7 +2,6 @@ module Settings.Builders.Ghc (ghcBuilderArgs, ghcMBuilderArgs, haddockGhcArgs) w
 
 import Flavour
 import GHC
-import Settings.Path (ghcSplitPath)
 import Settings.Builders.Common
 
 ghcBuilderArgs :: Args
diff --git a/src/Settings/Flavours/Quickest.hs b/src/Settings/Flavours/Quickest.hs
index fa7cad5..d5dff73 100644
--- a/src/Settings/Flavours/Quickest.hs
+++ b/src/Settings/Flavours/Quickest.hs
@@ -2,7 +2,6 @@ module Settings.Flavours.Quickest (quickestFlavour) where
 
 import Flavour
 import Predicate
-import Oracles.Config.Flag (platformSupportsSharedLibs)
 import {-# SOURCE #-} Settings.Default
 
 quickestFlavour :: Flavour
diff --git a/src/Settings/Packages/GhcCabal.hs b/src/Settings/Packages/GhcCabal.hs
index 57147e4..983292f 100644
--- a/src/Settings/Packages/GhcCabal.hs
+++ b/src/Settings/Packages/GhcCabal.hs
@@ -4,10 +4,8 @@ import Distribution.PackageDescription.Parse
 
 import Base
 import GHC
-import Oracles.Config.Setting
 import Oracles.Dependencies (pkgDependencies)
 import Predicate
-import Package (pkgCabalFile)
 import Distribution.Verbosity (silent)
 import Distribution.Text (display)
 import Distribution.Package (pkgVersion)
@@ -16,7 +14,6 @@ import qualified Distribution.PackageDescription as DP
 
 ghcCabalPackageArgs :: Args
 ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do
-    win <- lift windowsHost
     cabalDeps <- lift $ pkgDependencies cabal
     lift $ need [pkgCabalFile cabal]
     pd <- liftIO . readGenericPackageDescription silent $ pkgCabalFile cabal



More information about the ghc-commits mailing list