Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ghc-lib-gen warnings #548

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions ghc-lib-gen/src/Ghclibgen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ module Ghclibgen (

import Control.Exception (handle)
import Control.Monad.Extra
import System.Exit (ExitCode(..))
import System.Process.Extra
import System.FilePath hiding ((</>), normalise, dropTrailingPathSeparator)
import System.FilePath.Posix ((</>), normalise, dropTrailingPathSeparator) -- Make sure we generate / on all platforms.
import System.Directory
import System.Directory.Extra
import System.Info.Extra
import System.IO.Error (isEOFError)
import System.IO.Extra
import Data.List.Extra hiding (find)
Expand Down Expand Up @@ -1030,7 +1028,7 @@ applyPatchCmmParseNoImplicitPrelude _ = do
=<< readFile' cmmParse

applyPatchHadrianCabalProject :: GhcFlavor -> IO ()
applyPatchHadrianCabalProject ghcFlavor = do
applyPatchHadrianCabalProject _ = do
cabalProjectContents <- lines' <$> readFile' cabalProject
cabalProjectContents <- pure (unlines (cabalProjectContents ++ [ "flags:-selftest -with_bazel" ]))
writeFile cabalProject cabalProjectContents
Expand All @@ -1039,7 +1037,6 @@ applyPatchHadrianCabalProject ghcFlavor = do
lines' s = [ l | l <- lines s , not $ "index-state" `isPrefixOf` l ]
cabalProject = "hadrian" </> "cabal.project"
cabalProjectFreeze = cabalProject ++ ".freeze"
ghcApi = ghcSeries ghcFlavor

-- Data type representing an approximately parsed Cabal file.
data Cabal = Cabal
Expand Down
Loading