Skip to content

Commit

Permalink
Merge pull request #10743 from cabalism/deprecated/fwarn
Browse files Browse the repository at this point in the history
Use newer warning flags
  • Loading branch information
mergify[bot] authored Jan 26, 2025
2 parents 682c54a + f47768a commit 0de8459
Show file tree
Hide file tree
Showing 51 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Cabal-hooks/Cabal-hooks.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Cabal-syntax/Cabal-syntax.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 #-}

-----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/HackageTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/Test/Laws.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}
module Test.Laws where

import Prelude hiding (Num((+), (*)))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -fno-warn-deprecations #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module UnitTests.Distribution.CabalSpecVersion (tests) where

import Distribution.Compat.Prelude.Internal
Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/UnitTests/Distribution/Compat/Graph.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module UnitTests.Distribution.Compat.Graph
( tests
, arbitraryGraph
Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/UnitTests/Distribution/Described.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/UnitTests/Distribution/SPDX.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -fno-warn-deprecations #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module UnitTests.Distribution.SPDX (spdxTests) where

import Distribution.Compat.Prelude.Internal
Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/UnitTests/Distribution/System.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module UnitTests.Distribution.System
( tests
) where
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/UnitTests/Distribution/Utils/Generic.hs
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion Cabal-tests/tests/UnitTests/Distribution/Utils/NubList.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions Cabal-tests/tests/UnitTests/Distribution/Version.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cabal-tree-diff/src/Data/TreeDiff/Instances/CabalSPDX.hs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions Cabal/Cabal.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/Compat/FilePath.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}

module Distribution.Compat.FilePath
( isExtensionOf
Expand Down
4 changes: 2 additions & 2 deletions Cabal/src/Distribution/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-----------------------------------------------------------------------------
{-
Work around this warning:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/Simple/Build/PackageInfoModule/Z.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/Simple/Build/PathsModule/Z.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/Simple/ConfigureScript.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
{-# OPTIONS_GHC -fno-warn-deprecations #-}
{-# OPTIONS_GHC -Wno-deprecations #-}

-- |
-- Module : Distribution.Simple.ConfigureScript
Expand Down
2 changes: 1 addition & 1 deletion cabal-benchmarks/bench/CabalBenchmarks.hs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cabal-benchmarks/cabal-benchmarks.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cabal-install-solver/cabal-install-solver.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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(..)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}

-----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/Compat/Orphans.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module Distribution.Client.Compat.Orphans () where

Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/Compat/Prelude.hs
Original file line number Diff line number Diff line change
@@ -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:
--
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/Compat/Tar.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

{- FOURMOLU_DISABLE -}
module Distribution.Client.Compat.Tar
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/Errors.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}

-----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/FileMonitor.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/Tar.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

-----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion cabal-install/src/Distribution/Client/TargetSelector.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- TODO
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}

-----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion cabal-install/tests/IntegrationTests2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module UnitTests.Distribution.Client.ArbitraryInstances
( adjustSize
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module UnitTests.Distribution.Client.DescribedInstances where

Expand Down
2 changes: 1 addition & 1 deletion cabal-install/tests/UnitTests/Distribution/Client/Glob.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module UnitTests.Distribution.Client.Glob (tests) where

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module UnitTests.Distribution.Client.TreeDiffInstances () where

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module UnitTests.Distribution.Solver.Modular.RetryLog
( tests
Expand Down
6 changes: 3 additions & 3 deletions cabal-testsuite/cabal-testsuite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 0de8459

Please sign in to comment.