From f47768ae15e2bfc14ac2a2a43afe85d522c470f0 Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Sun, 12 Jan 2025 14:35:08 -0500 Subject: [PATCH] Use newer -W and -Wno- warning flags - Use newer warning flags in Paths_pkg template - Use newer warning flags in **/Z.hs --- Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs | 2 +- Cabal-hooks/Cabal-hooks.cabal | 2 +- Cabal-syntax/Cabal-syntax.cabal | 8 ++++---- .../src/Distribution/PackageDescription/Configuration.hs | 4 ++-- Cabal-tests/tests/HackageTests.hs | 2 +- Cabal-tests/tests/Test/Laws.hs | 2 +- .../tests/UnitTests/Distribution/CabalSpecVersion.hs | 2 +- Cabal-tests/tests/UnitTests/Distribution/Compat/Graph.hs | 2 +- Cabal-tests/tests/UnitTests/Distribution/Described.hs | 2 +- Cabal-tests/tests/UnitTests/Distribution/SPDX.hs | 2 +- Cabal-tests/tests/UnitTests/Distribution/System.hs | 2 +- .../Distribution/Types/GenericPackageDescription.hs | 2 +- Cabal-tests/tests/UnitTests/Distribution/Utils/Generic.hs | 2 +- Cabal-tests/tests/UnitTests/Distribution/Utils/NubList.hs | 2 +- Cabal-tests/tests/UnitTests/Distribution/Version.hs | 6 +++--- Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs | 2 +- .../src/Data/TreeDiff/Instances/CabalLanguage.hs | 2 +- Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs | 2 +- .../src/Data/TreeDiff/Instances/CabalVersion.hs | 2 +- Cabal/Cabal.cabal | 8 ++++---- Cabal/src/Distribution/Compat/FilePath.hs | 2 +- Cabal/src/Distribution/Simple.hs | 4 ++-- .../src/Distribution/Simple/Build/PackageInfoModule/Z.hs | 2 +- Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs | 2 +- Cabal/src/Distribution/Simple/ConfigureScript.hs | 2 +- cabal-benchmarks/bench/CabalBenchmarks.hs | 2 +- cabal-benchmarks/cabal-benchmarks.cabal | 2 +- cabal-install-solver/cabal-install-solver.cabal | 2 +- .../src/Distribution/Solver/Compat/Prelude.hs | 2 +- .../src/Distribution/Solver/Modular/Linking.hs | 2 +- .../src/Distribution/Solver/Modular/Solver.hs | 2 +- .../src/Distribution/Client/BuildReports/Storage.hs | 2 +- cabal-install/src/Distribution/Client/Compat/Orphans.hs | 2 +- cabal-install/src/Distribution/Client/Compat/Prelude.hs | 2 +- cabal-install/src/Distribution/Client/Compat/Tar.hs | 2 +- cabal-install/src/Distribution/Client/Errors.hs | 2 +- cabal-install/src/Distribution/Client/FileMonitor.hs | 2 +- cabal-install/src/Distribution/Client/Tar.hs | 2 +- cabal-install/src/Distribution/Client/TargetSelector.hs | 2 +- cabal-install/tests/IntegrationTests2.hs | 2 +- .../UnitTests/Distribution/Client/ArbitraryInstances.hs | 2 +- .../UnitTests/Distribution/Client/DescribedInstances.hs | 2 +- cabal-install/tests/UnitTests/Distribution/Client/Glob.hs | 2 +- .../tests/UnitTests/Distribution/Client/ProjectConfig.hs | 2 +- .../UnitTests/Distribution/Client/TreeDiffInstances.hs | 2 +- .../UnitTests/Distribution/Solver/Modular/QuickCheck.hs | 2 +- .../UnitTests/Distribution/Solver/Modular/RetryLog.hs | 2 +- cabal-testsuite/cabal-testsuite.cabal | 6 +++--- cabal-testsuite/src/Test/Cabal/Plan.hs | 2 +- solver-benchmarks/solver-benchmarks.cabal | 6 +++--- templates/Paths_pkg.template.hs | 2 +- 51 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs b/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs index a3b489ef369..115fa768899 100644 --- a/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs +++ b/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs @@ -1,6 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module Test.QuickCheck.Instances.Cabal () where #if !MIN_VERSION_base(4,18,0) diff --git a/Cabal-hooks/Cabal-hooks.cabal b/Cabal-hooks/Cabal-hooks.cabal index 390a560ee4c..d07b1201ec7 100644 --- a/Cabal-hooks/Cabal-hooks.cabal +++ b/Cabal-hooks/Cabal-hooks.cabal @@ -33,7 +33,7 @@ library , containers >= 0.5.0.0 && < 0.8 , transformers >= 0.5.6.0 && < 0.7 - ghc-options: -Wall -fno-ignore-asserts -fwarn-tabs -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates + ghc-options: -Wall -fno-ignore-asserts -Wtabs -Wincomplete-uni-patterns -Wincomplete-record-updates exposed-modules: Distribution.Simple.SetupHooks diff --git a/Cabal-syntax/Cabal-syntax.cabal b/Cabal-syntax/Cabal-syntax.cabal index aabe1fde63a..91026d479d3 100644 --- a/Cabal-syntax/Cabal-syntax.cabal +++ b/Cabal-syntax/Cabal-syntax.cabal @@ -48,10 +48,10 @@ library ghc-options: -Wall -fno-ignore-asserts - -fwarn-tabs - -fwarn-incomplete-uni-patterns - -fwarn-incomplete-record-updates - -fno-warn-unticked-promoted-constructors + -Wtabs + -Wincomplete-uni-patterns + -Wincomplete-record-updates + -Wno-unticked-promoted-constructors if impl(ghc >= 8.0) ghc-options: -Wcompat -Wnoncanonical-monad-instances diff --git a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs index eebf760094d..d23ac5cbf51 100644 --- a/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs +++ b/Cabal-syntax/src/Distribution/PackageDescription/Configuration.hs @@ -1,5 +1,5 @@ --- -fno-warn-deprecations for use of Map.foldWithKey -{-# OPTIONS_GHC -fno-warn-deprecations #-} +-- -Wno-deprecations for use of Map.foldWithKey +{-# OPTIONS_GHC -Wno-deprecations #-} ----------------------------------------------------------------------------- diff --git a/Cabal-tests/tests/HackageTests.hs b/Cabal-tests/tests/HackageTests.hs index 57a777b128a..dbad37c30f4 100644 --- a/Cabal-tests/tests/HackageTests.hs +++ b/Cabal-tests/tests/HackageTests.hs @@ -3,7 +3,7 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ScopedTypeVariables #-} #if !MIN_VERSION_deepseq(1,4,0) -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} #endif module Main where diff --git a/Cabal-tests/tests/Test/Laws.hs b/Cabal-tests/tests/Test/Laws.hs index 351cee7f0c6..0945c709dd3 100644 --- a/Cabal-tests/tests/Test/Laws.hs +++ b/Cabal-tests/tests/Test/Laws.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} +{-# OPTIONS_GHC -Wno-missing-signatures #-} module Test.Laws where import Prelude hiding (Num((+), (*))) diff --git a/Cabal-tests/tests/UnitTests/Distribution/CabalSpecVersion.hs b/Cabal-tests/tests/UnitTests/Distribution/CabalSpecVersion.hs index 2a23d3d23f1..46fc7dc0aa3 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/CabalSpecVersion.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/CabalSpecVersion.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} module UnitTests.Distribution.CabalSpecVersion (tests) where import Distribution.Compat.Prelude.Internal diff --git a/Cabal-tests/tests/UnitTests/Distribution/Compat/Graph.hs b/Cabal-tests/tests/UnitTests/Distribution/Compat/Graph.hs index 68763a81bd5..0e2ea86318b 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Compat/Graph.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Compat/Graph.hs @@ -1,6 +1,6 @@ {-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleInstances #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.Compat.Graph ( tests , arbitraryGraph diff --git a/Cabal-tests/tests/UnitTests/Distribution/Described.hs b/Cabal-tests/tests/UnitTests/Distribution/Described.hs index 2c73c805c71..9f1c70b51a7 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Described.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Described.hs @@ -1,6 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} module UnitTests.Distribution.Described where import Distribution.Compat.Prelude.Internal diff --git a/Cabal-tests/tests/UnitTests/Distribution/SPDX.hs b/Cabal-tests/tests/UnitTests/Distribution/SPDX.hs index b9454c20d20..297f98c8078 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/SPDX.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/SPDX.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} module UnitTests.Distribution.SPDX (spdxTests) where import Distribution.Compat.Prelude.Internal diff --git a/Cabal-tests/tests/UnitTests/Distribution/System.hs b/Cabal-tests/tests/UnitTests/Distribution/System.hs index d09b1b7f61b..4c703e65136 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/System.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/System.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.System ( tests ) where diff --git a/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs b/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs index 65bd55cb7d3..b8653abd38f 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Types/GenericPackageDescription.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-deprecations #-} -- for importing "Distribution.Compat.Prelude.Internal" +{-# OPTIONS_GHC -Wno-deprecations #-} -- for importing "Distribution.Compat.Prelude.Internal" module UnitTests.Distribution.Types.GenericPackageDescription where diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/Generic.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Generic.hs index 3eecc3c2a13..12d35da43bb 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Generic.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Generic.hs @@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} -- to suppress WARNING in "Distribution.Compat.Prelude.Internal" -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} module UnitTests.Distribution.Utils.Generic ( tests ) where diff --git a/Cabal-tests/tests/UnitTests/Distribution/Utils/NubList.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/NubList.hs index 61e25eec39b..28af23f0b89 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/NubList.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/NubList.hs @@ -1,5 +1,5 @@ -- to suppress WARNING in "Distribution.Compat.Prelude.Internal" -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} module UnitTests.Distribution.Utils.NubList ( tests ) where diff --git a/Cabal-tests/tests/UnitTests/Distribution/Version.hs b/Cabal-tests/tests/UnitTests/Distribution/Version.hs index 9bfcfc0e143..48c281cf079 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Version.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Version.hs @@ -1,6 +1,6 @@ -{-# OPTIONS_GHC -fno-warn-incomplete-patterns - -fno-warn-deprecations - -fno-warn-unused-binds #-} --FIXME +{-# OPTIONS_GHC -Wno-incomplete-patterns + -Wno-deprecations + -Wno-unused-binds #-} --FIXME module UnitTests.Distribution.Version (versionTests) where import Distribution.Compat.Prelude.Internal diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index a63faa3510c..cb36fe680db 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -freduction-depth=0 #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module Data.TreeDiff.Instances.Cabal () where import Data.TreeDiff diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalLanguage.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalLanguage.hs index 194ea34df80..094195a9478 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalLanguage.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalLanguage.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -freduction-depth=0 #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module Data.TreeDiff.Instances.CabalLanguage () where import Data.TreeDiff diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs index 520cbf8c894..a24cac07f9c 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -freduction-depth=0 #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module Data.TreeDiff.Instances.CabalSPDX () where import Data.TreeDiff diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalVersion.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalVersion.hs index 4321fd0bc3d..ec96ec9f6b1 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalVersion.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalVersion.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -freduction-depth=0 #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module Data.TreeDiff.Instances.CabalVersion where import Data.TreeDiff diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal index 15bec87f0d1..ecb7ea27125 100644 --- a/Cabal/Cabal.cabal +++ b/Cabal/Cabal.cabal @@ -66,10 +66,10 @@ library ghc-options: -Wall -fno-ignore-asserts - -fwarn-tabs - -fwarn-incomplete-uni-patterns - -fwarn-incomplete-record-updates - -fno-warn-unticked-promoted-constructors + -Wtabs + -Wincomplete-uni-patterns + -Wincomplete-record-updates + -Wno-unticked-promoted-constructors if impl(ghc >= 8.0) ghc-options: -Wcompat -Wnoncanonical-monad-instances diff --git a/Cabal/src/Distribution/Compat/FilePath.hs b/Cabal/src/Distribution/Compat/FilePath.hs index 6e1c7961313..80ab398bf6c 100644 --- a/Cabal/src/Distribution/Compat/FilePath.hs +++ b/Cabal/src/Distribution/Compat/FilePath.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-} +{-# OPTIONS_GHC -Wno-unused-imports #-} module Distribution.Compat.FilePath ( isExtensionOf diff --git a/Cabal/src/Distribution/Simple.hs b/Cabal/src/Distribution/Simple.hs index 985d85419db..3e9e06a7169 100644 --- a/Cabal/src/Distribution/Simple.hs +++ b/Cabal/src/Distribution/Simple.hs @@ -4,7 +4,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ----------------------------------------------------------------------------- {- Work around this warning: @@ -13,7 +12,8 @@ libraries/Cabal/Distribution/Simple.hs:78:0: (imported from Distribution.Simple.UserHooks): Deprecated: "Please use the new testing interface instead!" -} -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -- | -- Module : Distribution.Simple diff --git a/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs b/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs index 6bc97314809..514c3da1d60 100644 --- a/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs +++ b/Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs @@ -22,7 +22,7 @@ render z_root = execWriter $ do return () else do return () - tell "{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}\n" + tell "{-# OPTIONS_GHC -Wno-missing-import-lists #-}\n" tell "{-# OPTIONS_GHC -w #-}\n" tell "module PackageInfo_" tell (zPackageName z_root) diff --git a/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs b/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs index 7c36c4ce507..22a3ac7b73b 100644 --- a/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs +++ b/Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs @@ -51,7 +51,7 @@ render z_root = execWriter $ do return () else do return () - tell "{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}\n" + tell "{-# OPTIONS_GHC -Wno-missing-import-lists #-}\n" tell "{-# OPTIONS_GHC -w #-}\n" tell "module Paths_" tell (zManglePkgName z_root (zPackageName z_root)) diff --git a/Cabal/src/Distribution/Simple/ConfigureScript.hs b/Cabal/src/Distribution/Simple/ConfigureScript.hs index cf2a18297ee..86c5b384e86 100644 --- a/Cabal/src/Distribution/Simple/ConfigureScript.hs +++ b/Cabal/src/Distribution/Simple/ConfigureScript.hs @@ -5,7 +5,7 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} ----------------------------------------------------------------------------- -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} -- | -- Module : Distribution.Simple.ConfigureScript diff --git a/cabal-benchmarks/bench/CabalBenchmarks.hs b/cabal-benchmarks/bench/CabalBenchmarks.hs index 39580898e86..0c60b8c20ac 100644 --- a/cabal-benchmarks/bench/CabalBenchmarks.hs +++ b/cabal-benchmarks/bench/CabalBenchmarks.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} module Main where import Test.Tasty.Bench (bench, bgroup, defaultMain, env, nf, whnf) diff --git a/cabal-benchmarks/cabal-benchmarks.cabal b/cabal-benchmarks/cabal-benchmarks.cabal index 2b247e565cf..ade0fa3b178 100644 --- a/cabal-benchmarks/cabal-benchmarks.cabal +++ b/cabal-benchmarks/cabal-benchmarks.cabal @@ -26,7 +26,7 @@ test-suite cabal-benchmarks type: exitcode-stdio-1.0 main-is: CabalBenchmarks.hs hs-source-dirs: bench - ghc-options: -threaded -Wall -fwarn-tabs + ghc-options: -threaded -Wall -Wtabs build-depends: base , bytestring diff --git a/cabal-install-solver/cabal-install-solver.cabal b/cabal-install-solver/cabal-install-solver.cabal index 0002922e5c2..b70e5122e40 100644 --- a/cabal-install-solver/cabal-install-solver.cabal +++ b/cabal-install-solver/cabal-install-solver.cabal @@ -38,7 +38,7 @@ library hs-source-dirs: src-assertion ghc-options: -Wall -Wcompat -Wnoncanonical-monad-instances - -fwarn-tabs -fwarn-incomplete-uni-patterns + -Wtabs -Wincomplete-uni-patterns if impl(ghc < 8.8) ghc-options: -Wnoncanonical-monadfail-instances diff --git a/cabal-install-solver/src/Distribution/Solver/Compat/Prelude.hs b/cabal-install-solver/src/Distribution/Solver/Compat/Prelude.hs index abcae0c7242..d20e1863835 100644 --- a/cabal-install-solver/src/Distribution/Solver/Compat/Prelude.hs +++ b/cabal-install-solver/src/Distribution/Solver/Compat/Prelude.hs @@ -1,5 +1,5 @@ -- to suppress WARNING in "Distribution.Compat.Prelude.Internal" -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} -- | This module does two things: -- diff --git a/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs b/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs index 3e4e2de3ee6..15514472c80 100644 --- a/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs +++ b/cabal-install-solver/src/Distribution/Solver/Modular/Linking.hs @@ -2,7 +2,7 @@ {-# LANGUAGE MultiParamTypeClasses #-} -- TODO: remove this -{-# OPTIONS -fno-warn-incomplete-uni-patterns #-} +{-# OPTIONS -Wno-incomplete-uni-patterns #-} module Distribution.Solver.Modular.Linking ( validateLinking ) where diff --git a/cabal-install-solver/src/Distribution/Solver/Modular/Solver.hs b/cabal-install-solver/src/Distribution/Solver/Modular/Solver.hs index 58045b56814..b2c89fc1537 100644 --- a/cabal-install-solver/src/Distribution/Solver/Modular/Solver.hs +++ b/cabal-install-solver/src/Distribution/Solver/Modular/Solver.hs @@ -1,7 +1,7 @@ {-# LANGUAGE CPP #-} #ifdef DEBUG_TRACETREE {-# LANGUAGE FlexibleInstances #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} #endif module Distribution.Solver.Modular.Solver ( SolverConfig(..) diff --git a/cabal-install/src/Distribution/Client/BuildReports/Storage.hs b/cabal-install/src/Distribution/Client/BuildReports/Storage.hs index 34f2c380035..740a32cd9c3 100644 --- a/cabal-install/src/Distribution/Client/BuildReports/Storage.hs +++ b/cabal-install/src/Distribution/Client/BuildReports/Storage.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ----------------------------------------------------------------------------- diff --git a/cabal-install/src/Distribution/Client/Compat/Orphans.hs b/cabal-install/src/Distribution/Client/Compat/Orphans.hs index bbc44bb5c8a..58b780d79ba 100644 --- a/cabal-install/src/Distribution/Client/Compat/Orphans.hs +++ b/cabal-install/src/Distribution/Client/Compat/Orphans.hs @@ -1,5 +1,5 @@ {-# LANGUAGE BangPatterns #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module Distribution.Client.Compat.Orphans () where diff --git a/cabal-install/src/Distribution/Client/Compat/Prelude.hs b/cabal-install/src/Distribution/Client/Compat/Prelude.hs index 42d048c9b61..028b5f4a5f1 100644 --- a/cabal-install/src/Distribution/Client/Compat/Prelude.hs +++ b/cabal-install/src/Distribution/Client/Compat/Prelude.hs @@ -1,5 +1,5 @@ -- to suppress WARNING in "Distribution.Compat.Prelude.Internal" -{-# OPTIONS_GHC -fno-warn-deprecations #-} +{-# OPTIONS_GHC -Wno-deprecations #-} -- | This module does two things: -- diff --git a/cabal-install/src/Distribution/Client/Compat/Tar.hs b/cabal-install/src/Distribution/Client/Compat/Tar.hs index 8597c61fede..b2649bc2e2b 100644 --- a/cabal-install/src/Distribution/Client/Compat/Tar.hs +++ b/cabal-install/src/Distribution/Client/Compat/Tar.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} {- FOURMOLU_DISABLE -} module Distribution.Client.Compat.Tar diff --git a/cabal-install/src/Distribution/Client/Errors.hs b/cabal-install/src/Distribution/Client/Errors.hs index de81012c6a5..ff9ad369bef 100644 --- a/cabal-install/src/Distribution/Client/Errors.hs +++ b/cabal-install/src/Distribution/Client/Errors.hs @@ -1,7 +1,7 @@ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE InstanceSigs #-} -{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ----------------------------------------------------------------------------- diff --git a/cabal-install/src/Distribution/Client/FileMonitor.hs b/cabal-install/src/Distribution/Client/FileMonitor.hs index 6883b6b107d..57b42d2ff63 100644 --- a/cabal-install/src/Distribution/Client/FileMonitor.hs +++ b/cabal-install/src/Distribution/Client/FileMonitor.hs @@ -4,7 +4,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} -- | An abstraction to help with re-running actions when files or other -- input values they depend on have changed. diff --git a/cabal-install/src/Distribution/Client/Tar.hs b/cabal-install/src/Distribution/Client/Tar.hs index 8d0f5449c67..3772cc672e2 100644 --- a/cabal-install/src/Distribution/Client/Tar.hs +++ b/cabal-install/src/Distribution/Client/Tar.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} ----------------------------------------------------------------------------- diff --git a/cabal-install/src/Distribution/Client/TargetSelector.hs b/cabal-install/src/Distribution/Client/TargetSelector.hs index 6e0ad2488f3..b31655c59c6 100644 --- a/cabal-install/src/Distribution/Client/TargetSelector.hs +++ b/cabal-install/src/Distribution/Client/TargetSelector.hs @@ -4,7 +4,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -- TODO -{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ----------------------------------------------------------------------------- diff --git a/cabal-install/tests/IntegrationTests2.hs b/cabal-install/tests/IntegrationTests2.hs index 04bd32add66..2b25a64b6be 100644 --- a/cabal-install/tests/IntegrationTests2.hs +++ b/cabal-install/tests/IntegrationTests2.hs @@ -3,7 +3,7 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} -- For the handy instance IsString PackageIdentifier -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module Main where diff --git a/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs b/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs index 4246617a6e0..17d098b23b8 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/ArbitraryInstances.hs @@ -1,6 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.Client.ArbitraryInstances ( adjustSize diff --git a/cabal-install/tests/UnitTests/Distribution/Client/DescribedInstances.hs b/cabal-install/tests/UnitTests/Distribution/Client/DescribedInstances.hs index 7e52d25173f..11d32e0d1cf 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/DescribedInstances.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/DescribedInstances.hs @@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.Client.DescribedInstances where diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Glob.hs b/cabal-install/tests/UnitTests/Distribution/Client/Glob.hs index 38d245a045c..b41a4dd3fc3 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/Glob.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/Glob.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.Client.Glob (tests) where diff --git a/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs b/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs index 1733153f856..bf69b20ee04 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs @@ -1,7 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RecordWildCards #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} -- simplifier goes nuts otherwise #if __GLASGOW_HASKELL__ < 806 diff --git a/cabal-install/tests/UnitTests/Distribution/Client/TreeDiffInstances.hs b/cabal-install/tests/UnitTests/Distribution/Client/TreeDiffInstances.hs index da9bd8ad90d..179fef5688a 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/TreeDiffInstances.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/TreeDiffInstances.hs @@ -1,6 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.Client.TreeDiffInstances () where diff --git a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs index d53729e1a21..9994acee2e9 100644 --- a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs +++ b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/QuickCheck.hs @@ -1,6 +1,6 @@ {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE StandaloneDeriving #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.Solver.Modular.QuickCheck (tests) where diff --git a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/RetryLog.hs b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/RetryLog.hs index 8b0744a4aab..5c1d26a1bc2 100644 --- a/cabal-install/tests/UnitTests/Distribution/Solver/Modular/RetryLog.hs +++ b/cabal-install/tests/UnitTests/Distribution/Solver/Modular/RetryLog.hs @@ -1,5 +1,5 @@ {-# LANGUAGE StandaloneDeriving #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} module UnitTests.Distribution.Solver.Modular.RetryLog ( tests diff --git a/cabal-testsuite/cabal-testsuite.cabal b/cabal-testsuite/cabal-testsuite.cabal index 4e31b87d254..a34368621e8 100644 --- a/cabal-testsuite/cabal-testsuite.cabal +++ b/cabal-testsuite/cabal-testsuite.cabal @@ -32,9 +32,9 @@ common shared ghc-options: -Wall - -fwarn-tabs - -fwarn-incomplete-uni-patterns - -fno-warn-unticked-promoted-constructors + -Wtabs + -Wincomplete-uni-patterns + -Wno-unticked-promoted-constructors library diff --git a/cabal-testsuite/src/Test/Cabal/Plan.hs b/cabal-testsuite/src/Test/Cabal/Plan.hs index 274f11f83a6..b0b46802f85 100644 --- a/cabal-testsuite/src/Test/Cabal/Plan.hs +++ b/cabal-testsuite/src/Test/Cabal/Plan.hs @@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-orphans #-} +{-# OPTIONS_GHC -Wno-orphans #-} -- | Utilities for understanding @plan.json@. module Test.Cabal.Plan ( Plan, diff --git a/solver-benchmarks/solver-benchmarks.cabal b/solver-benchmarks/solver-benchmarks.cabal index f2e88add7b9..eb0e2e762be 100644 --- a/solver-benchmarks/solver-benchmarks.cabal +++ b/solver-benchmarks/solver-benchmarks.cabal @@ -23,7 +23,7 @@ source-repository head subdir: solver-benchmarks library - ghc-options: -Wall -fwarn-tabs + ghc-options: -Wall -Wtabs exposed-modules: HackageBenchmark build-depends: @@ -44,7 +44,7 @@ library executable hackage-benchmark main-is: hackage-benchmark.hs hs-source-dirs: main - ghc-options: -threaded -Wall -fwarn-tabs + ghc-options: -threaded -Wall -Wtabs build-depends: , base , solver-benchmarks @@ -54,7 +54,7 @@ test-suite unit-tests type: exitcode-stdio-1.0 main-is: HackageBenchmarkTest.hs hs-source-dirs: tests - ghc-options: -threaded -Wall -fwarn-tabs + ghc-options: -threaded -Wall -Wtabs build-depends: , base , solver-benchmarks diff --git a/templates/Paths_pkg.template.hs b/templates/Paths_pkg.template.hs index 0f0017868ae..5a4df3ff703 100644 --- a/templates/Paths_pkg.template.hs +++ b/templates/Paths_pkg.template.hs @@ -12,7 +12,7 @@ {-# OPTIONS_GHC -Wno-prepositive-qualified-module #-} #endif {% endif %} -{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -Wno-missing-import-lists #-} {-# OPTIONS_GHC -w #-} module Paths_{{ manglePkgName packageName }} ( version,