From f47768ae15e2bfc14ac2a2a43afe85d522c470f0 Mon Sep 17 00:00:00 2001 From: Phil de Joux <philderbeast@gmail.com> 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 a3b489ef36..115fa76889 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 390a560ee4..d07b1201ec 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 aabe1fde63..91026d479d 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 eebf760094..d23ac5cbf5 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 57a777b128..dbad37c30f 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 351cee7f0c..0945c709dd 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 2a23d3d23f..46fc7dc0aa 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 68763a81bd..0e2ea86318 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 2c73c805c7..9f1c70b51a 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 b9454c20d2..297f98c807 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 d09b1b7f61..4c703e6513 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 65bd55cb7d..b8653abd38 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 3eecc3c2a1..12d35da43b 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 61e25eec39..28af23f0b8 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 9bfcfc0e14..48c281cf07 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 a63faa3510..cb36fe680d 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 194ea34df8..094195a947 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 520cbf8c89..a24cac07f9 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 4321fd0bc3..ec96ec9f6b 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 15bec87f0d..ecb7ea2712 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 6e1c796131..80ab398bf6 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 985d85419d..3e9e06a716 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 6bc9731480..514c3da1d6 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 7c36c4ce50..22a3ac7b73 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 cf2a18297e..86c5b384e8 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 39580898e8..0c60b8c20a 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 2b247e565c..ade0fa3b17 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 0002922e5c..b70e5122e4 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 abcae0c724..d20e186383 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 3e4e2de3ee..15514472c8 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 58045b5681..b2c89fc153 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 34f2c38003..740a32cd9c 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 bbc44bb5c8..58b780d79b 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 42d048c9b6..028b5f4a5f 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 8597c61fed..b2649bc2e2 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 de81012c6a..ff9ad369be 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 6883b6b107..57b42d2ff6 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 8d0f5449c6..3772cc672e 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 6e0ad2488f..b31655c59c 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 04bd32add6..2b25a64b6b 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 4246617a6e..17d098b23b 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 7e52d25173..11d32e0d1c 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 38d245a045..b41a4dd3fc 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 1733153f85..bf69b20ee0 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 da9bd8ad90..179fef5688 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 d53729e1a2..9994acee2e 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 8b0744a4aa..5c1d26a1bc 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 4e31b87d25..a34368621e 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 274f11f83a..b0b46802f8 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 f2e88add7b..eb0e2e762b 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 0f0017868a..5a4df3ff70 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, -- GitLab