Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

clean up warnings #544

Closed
izgzhen opened this issue Apr 2, 2018 · 2 comments
Closed

clean up warnings #544

izgzhen opened this issue Apr 2, 2018 · 2 comments
Assignees
Labels

Comments

@izgzhen
Copy link
Collaborator

izgzhen commented Apr 2, 2018

as of 9a46249

src/CommandLine.hs:14:1: warning: [-Wunused-imports]
    The qualified import of ‘UserSettings’ is redundant
      except perhaps to import instances from ‘UserSettings’
    To import instances alone, use: import UserSettings()
   |
14 | import qualified UserSettings
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[37 of 86] Compiling Settings.Flavours.Quickest ( src/Settings/Flavours/Quickest.hs, dist/build/hadrian/hadrian-tmp/Settings/Flavours/Quickest.o )
[38 of 86] Compiling Settings.Flavours.QuickCross ( src/Settings/Flavours/QuickCross.hs, dist/build/hadrian/hadrian-tmp/Settings/Flavours/QuickCross.o ) [Expression changed]
[39 of 86] Compiling Settings.Flavours.Quick ( src/Settings/Flavours/Quick.hs, dist/build/hadrian/hadrian-tmp/Settings/Flavours/Quick.o ) [Expression changed]
[40 of 86] Compiling Settings.Flavours.Profiled ( src/Settings/Flavours/Profiled.hs, dist/build/hadrian/hadrian-tmp/Settings/Flavours/Profiled.o ) [Expression changed]
[41 of 86] Compiling Settings.Flavours.Performance ( src/Settings/Flavours/Performance.hs, dist/build/hadrian/hadrian-tmp/Settings/Flavours/Performance.o ) [Expression changed]
[42 of 86] Compiling Settings.Flavours.Development ( src/Settings/Flavours/Development.hs, dist/build/hadrian/hadrian-tmp/Settings/Flavours/Development.o ) [Expression changed]
[43 of 86] Compiling Settings         ( src/Settings.hs, dist/build/hadrian/hadrian-tmp/Settings.o )
[44 of 86] Compiling Settings.Warnings ( src/Settings/Warnings.hs, dist/build/hadrian/hadrian-tmp/Settings/Warnings.o )
[45 of 86] Compiling Settings.Packages.Rts ( src/Settings/Packages/Rts.hs, dist/build/hadrian/hadrian-tmp/Settings/Packages/Rts.o )
[46 of 86] Compiling Settings.Builders.Common ( src/Settings/Builders/Common.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Common.o )

src/Settings/Builders/Common.hs:66:3: warning: [-Wunused-matches]
    Defined but not used: ‘top’
   |
66 |   top <- expr topDirectory
   |   ^^^
[47 of 86] Compiling Settings.Builders.Xelatex ( src/Settings/Builders/Xelatex.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Xelatex.o ) [Builder changed]
[48 of 86] Compiling Settings.Builders.Ld ( src/Settings/Builders/Ld.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Ld.o ) [Builder changed]
[49 of 86] Compiling Settings.Builders.HsCpp ( src/Settings/Builders/HsCpp.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/HsCpp.o )
[50 of 86] Compiling Settings.Builders.Happy ( src/Settings/Builders/Happy.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Happy.o ) [Builder changed]
[51 of 86] Compiling Settings.Builders.GhcPkg ( src/Settings/Builders/GhcPkg.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/GhcPkg.o )
[52 of 86] Compiling Settings.Builders.GenPrimopCode ( src/Settings/Builders/GenPrimopCode.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/GenPrimopCode.o ) [Builder changed]
[53 of 86] Compiling Settings.Builders.Cc ( src/Settings/Builders/Cc.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Cc.o )
[54 of 86] Compiling Settings.Builders.Alex ( src/Settings/Builders/Alex.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Alex.o ) [Builder changed]
[55 of 86] Compiling GHC              ( src/GHC.hs, dist/build/hadrian/hadrian-tmp/GHC.o )

src/GHC.hs:162:1: warning: [-Wunused-top-binds]
    Defined but not used: ‘stripCmdPath’
    |
162 | stripCmdPath = do
    | ^^^^^^^^^^^^
[56 of 86] Compiling Settings.Builders.Ghc ( src/Settings/Builders/Ghc.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Ghc.o )
[57 of 86] Compiling Builder          ( src/Builder.hs, dist/build/hadrian/hadrian-tmp/Builder.o )
[58 of 86] Compiling Target           ( src/Target.hs, dist/build/hadrian/hadrian-tmp/Target.o ) [Builder changed]
[59 of 86] Compiling Utilities        ( src/Utilities.hs, dist/build/hadrian/hadrian-tmp/Utilities.o )
[60 of 86] Compiling Rules.Test       ( src/Rules/Test.hs, dist/build/hadrian/hadrian-tmp/Rules/Test.o )
[61 of 86] Compiling Settings.Builders.RunTest ( src/Settings/Builders/RunTest.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/RunTest.o )
[62 of 86] Compiling Rules.Libffi     ( src/Rules/Libffi.hs, dist/build/hadrian/hadrian-tmp/Rules/Libffi.o )
[63 of 86] Compiling Rules.Gmp        ( src/Rules/Gmp.hs, dist/build/hadrian/hadrian-tmp/Rules/Gmp.o )
[64 of 86] Compiling Settings.Packages ( src/Settings/Packages.hs, dist/build/hadrian/hadrian-tmp/Settings/Packages.o )
[65 of 86] Compiling Settings.Builders.Make ( src/Settings/Builders/Make.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Make.o ) [Builder changed]
[66 of 86] Compiling Settings.Builders.Configure ( src/Settings/Builders/Configure.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Configure.o ) [Builder changed]
[67 of 86] Compiling Settings.Builders.Hsc2Hs ( src/Settings/Builders/Hsc2Hs.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Hsc2Hs.o )
[68 of 86] Compiling Settings.Builders.GhcCabal ( src/Settings/Builders/GhcCabal.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/GhcCabal.o )

src/Settings/Builders/GhcCabal.hs:159:1: warning: [-Wunused-top-binds]
    Defined but not used: ‘stagedBuilderPath’
    |
159 | stagedBuilderPath sb = builderPath . sb =<< getStage
    | ^^^^^^^^^^^^^^^^^
[69 of 86] Compiling Settings.Builders.DeriveConstants ( src/Settings/Builders/DeriveConstants.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/DeriveConstants.o )
[70 of 86] Compiling Rules.SourceDist ( src/Rules/SourceDist.hs, dist/build/hadrian/hadrian-tmp/Rules/SourceDist.o )

src/Rules/SourceDist.hs:8:1: warning: [-Wunused-imports]
    The import of ‘Rules.Clean’ is redundant
      except perhaps to import instances from ‘Rules.Clean’
    To import instances alone, use: import Rules.Clean()
  |
8 | import Rules.Clean
  | ^^^^^^^^^^^^^^^^^^
[71 of 86] Compiling Rules.Configure  ( src/Rules/Configure.hs, dist/build/hadrian/hadrian-tmp/Rules/Configure.o )
[72 of 86] Compiling Oracles.ModuleFiles ( src/Oracles/ModuleFiles.hs, dist/build/hadrian/hadrian-tmp/Oracles/ModuleFiles.o )
[73 of 86] Compiling Rules.Selftest   ( src/Rules/Selftest.hs, dist/build/hadrian/hadrian-tmp/Rules/Selftest.o ) [Base changed]
[74 of 86] Compiling Rules.Program    ( src/Rules/Program.hs, dist/build/hadrian/hadrian-tmp/Rules/Program.o )
[75 of 86] Compiling Rules.Generate   ( src/Rules/Generate.hs, dist/build/hadrian/hadrian-tmp/Rules/Generate.o )
[76 of 86] Compiling Rules.Compile    ( src/Rules/Compile.hs, dist/build/hadrian/hadrian-tmp/Rules/Compile.o )
[77 of 86] Compiling Rules.Documentation ( src/Rules/Documentation.hs, dist/build/hadrian/hadrian-tmp/Rules/Documentation.o )
[78 of 86] Compiling Settings.Builders.Haddock ( src/Settings/Builders/Haddock.hs, dist/build/hadrian/hadrian-tmp/Settings/Builders/Haddock.o )
[79 of 86] Compiling Settings.Default ( src/Settings/Default.hs, dist/build/hadrian/hadrian-tmp/Settings/Default.o )

src/Settings/Default.hs:34:1: warning: [-Wunused-imports]
    The import of ‘GHC.Packages’ is redundant
      except perhaps to import instances from ‘GHC.Packages’
    To import instances alone, use: import GHC.Packages()
   |
34 | import GHC.Packages
   | ^^^^^^^^^^^^^^^^^^^
[80 of 86] Compiling Rules.Dependencies ( src/Rules/Dependencies.hs, dist/build/hadrian/hadrian-tmp/Rules/Dependencies.o )
[81 of 86] Compiling Hadrian.Haskell.Cabal.Parse ( src/Hadrian/Haskell/Cabal/Parse.hs, dist/build/hadrian/hadrian-tmp/Hadrian/Haskell/Cabal/Parse.o )

src/Hadrian/Haskell/Cabal/Parse.hs:39:1: warning: [-Wunused-imports]
    The qualified import of ‘Distribution.Types.CondTree’ is redundant
      except perhaps to import instances from ‘Distribution.Types.CondTree’
    To import instances alone, use: import Distribution.Types.CondTree()
   |
39 | import qualified Distribution.Types.CondTree            as C
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Hadrian/Haskell/Cabal/Parse.hs:105:26: warning: [-Wdeprecations]
    In the use of ‘finalizePackageDescription’
    (imported from Distribution.PackageDescription.Configuration):
    Deprecated: "This function now always assumes tests and benchmarks are disabled; use finalizePD with ComponentRequestedSpec to specify something more specific. This symbol will be removed in Cabal-3.0 (est. Oct 2018)."
    |
105 |     let (Right (pd,_)) = C.finalizePackageDescription flags (const True) platform (C.compilerInfo compiler) [] gpd
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Hadrian/Haskell/Cabal/Parse.hs:224:19: warning: [-Wdeprecations]
    In the use of ‘externalPackageDeps’
    (imported from Distribution.Types.LocalBuildInfo):
    Deprecated: "You almost certainly don't want this function, which agglomerates the dependencies of ALL enabled components.  If you're using this to write out information on your dependencies, read off the dependencies directly from the actual component in question.  To be removed in Cabal 3.0"
    |
224 |     let extDeps = C.externalPackageDeps lbi'
    |                   ^^^^^^^^^^^^^^^^^^^^^
@izgzhen izgzhen added the easy label Apr 2, 2018
@snowleopard
Copy link
Owner

Thanks, I think I've already done this in a local branch. Will push it later today.

@snowleopard snowleopard self-assigned this Apr 2, 2018
snowleopard added a commit that referenced this issue Apr 3, 2018
snowleopard added a commit that referenced this issue Apr 3, 2018
* Fix warnings

* Link to GitHub issues

See #544
@snowleopard
Copy link
Owner

This should now be fixed (#547).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants