summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/Control/Arrow.hs2
-rw-r--r--libraries/base/Control/Category.hs2
-rw-r--r--libraries/base/Control/Concurrent.hs2
-rw-r--r--libraries/base/Foreign/C/Types.hs4
-rw-r--r--libraries/base/GHC/Base.hs4
-rw-r--r--libraries/base/GHC/Conc.hs2
-rw-r--r--libraries/base/GHC/Conc/IO.hs2
-rw-r--r--libraries/base/GHC/Conc/Sync.hs2
-rw-r--r--libraries/base/GHC/Conc/Windows.hs2
-rw-r--r--libraries/base/GHC/Event/IntTable.hs2
-rw-r--r--libraries/base/GHC/Float.hs2
-rw-r--r--libraries/base/GHC/IO/Encoding/CodePage/API.hs2
-rw-r--r--libraries/base/GHC/IO/FD.hs2
-rw-r--r--libraries/base/GHC/IO/Handle.hs2
-rw-r--r--libraries/base/GHC/IO/Handle/Internals.hs4
-rw-r--r--libraries/base/GHC/IO/Handle/Text.hs4
-rw-r--r--libraries/base/GHC/Real.hs2
-rw-r--r--libraries/base/Text/Show/Functions.hs2
-rw-r--r--libraries/ghc-prim/GHC/Classes.hs8
-rw-r--r--mk/warnings.mk57
20 files changed, 57 insertions, 52 deletions
diff --git a/libraries/base/Control/Arrow.hs b/libraries/base/Control/Arrow.hs
index 8a4bc2d22f..3417f30cc1 100644
--- a/libraries/base/Control/Arrow.hs
+++ b/libraries/base/Control/Arrow.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-{-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-}
+{-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
-- The RULES for the methods of class Arrow may never fire
-- e.g. compose/arr; see Trac #10528
diff --git a/libraries/base/Control/Category.hs b/libraries/base/Control/Category.hs
index 8616a17cdd..b638189b60 100644
--- a/libraries/base/Control/Category.hs
+++ b/libraries/base/Control/Category.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
-{-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-}
+{-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
-- The RULES for the methods of class Category may never fire
-- e.g. identity/left, identity/right, association; see Trac #10528
diff --git a/libraries/base/Control/Concurrent.hs b/libraries/base/Control/Concurrent.hs
index 1786c3ded3..babe8d9a76 100644
--- a/libraries/base/Control/Concurrent.hs
+++ b/libraries/base/Control/Concurrent.hs
@@ -5,7 +5,7 @@
, ScopedTypeVariables
, RankNTypes
#-}
-{-# OPTIONS_GHC -fno-warn-deprecations #-}
+{-# OPTIONS_GHC -Wno-deprecations #-}
-- kludge for the Control.Concurrent.QSem, Control.Concurrent.QSemN
-- and Control.Concurrent.SampleVar imports.
diff --git a/libraries/base/Foreign/C/Types.hs b/libraries/base/Foreign/C/Types.hs
index cc0eb1b729..fef8e4a3b6 100644
--- a/libraries/base/Foreign/C/Types.hs
+++ b/libraries/base/Foreign/C/Types.hs
@@ -1,8 +1,8 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, GeneralizedNewtypeDeriving,
StandaloneDeriving #-}
-{-# OPTIONS_GHC -fno-warn-unused-binds #-}
--- XXX -fno-warn-unused-binds stops us warning about unused constructors,
+{-# OPTIONS_GHC -Wno-unused-binds #-}
+-- XXX -Wno-unused-binds stops us warning about unused constructors,
-- but really we should just remove them if we don't want them
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index 90eaaf0a1e..89ec703163 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -84,9 +84,9 @@ Other Prelude modules are much easier with fewer complex dependencies.
, ExistentialQuantification
, RankNTypes
#-}
--- -fno-warn-orphans is needed for things like:
+-- -Wno-orphans is needed for things like:
-- Orphan rule: "x# -# x#" ALWAYS forall x# :: Int# -# x# x# = 0
-{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Conc.hs b/libraries/base/GHC/Conc.hs
index 68182a11e4..38fac431b0 100644
--- a/libraries/base/GHC/Conc.hs
+++ b/libraries/base/GHC/Conc.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
+{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Conc/IO.hs b/libraries/base/GHC/Conc/IO.hs
index 3a57c93369..b2c96b9fdb 100644
--- a/libraries/base/GHC/Conc/IO.hs
+++ b/libraries/base/GHC/Conc/IO.hs
@@ -4,7 +4,7 @@
, MagicHash
, UnboxedTuples
#-}
-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
+{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs
index 83934fe05a..5e277332d0 100644
--- a/libraries/base/GHC/Conc/Sync.hs
+++ b/libraries/base/GHC/Conc/Sync.hs
@@ -8,7 +8,7 @@
, StandaloneDeriving
, RankNTypes
#-}
-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
+{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Conc/Windows.hs b/libraries/base/GHC/Conc/Windows.hs
index 16112cdd7c..8913a65907 100644
--- a/libraries/base/GHC/Conc/Windows.hs
+++ b/libraries/base/GHC/Conc/Windows.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-}
-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
+{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Event/IntTable.hs b/libraries/base/GHC/Event/IntTable.hs
index 8d0f1797c2..ea487d5391 100644
--- a/libraries/base/GHC/Event/IntTable.hs
+++ b/libraries/base/GHC/Event/IntTable.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE BangPatterns, NoImplicitPrelude, RecordWildCards #-}
-{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
+{-# OPTIONS_GHC -Wno-name-shadowing #-}
module GHC.Event.IntTable
(
diff --git a/libraries/base/GHC/Float.hs b/libraries/base/GHC/Float.hs
index 74d7cb8f01..e6180afcf6 100644
--- a/libraries/base/GHC/Float.hs
+++ b/libraries/base/GHC/Float.hs
@@ -6,7 +6,7 @@
#-}
-- We believe we could deorphan this module, by moving lots of things
-- around, but we haven't got there yet:
-{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/IO/Encoding/CodePage/API.hs b/libraries/base/GHC/IO/Encoding/CodePage/API.hs
index 7fd22cb012..103eb87a0d 100644
--- a/libraries/base/GHC/IO/Encoding/CodePage/API.hs
+++ b/libraries/base/GHC/IO/Encoding/CodePage/API.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, NondecreasingIndentation,
RecordWildCards, ScopedTypeVariables #-}
-{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
+{-# OPTIONS_GHC -Wno-name-shadowing #-}
module GHC.IO.Encoding.CodePage.API (
mkCodePageEncoding
diff --git a/libraries/base/GHC/IO/FD.hs b/libraries/base/GHC/IO/FD.hs
index edce50003d..eb7b80bb44 100644
--- a/libraries/base/GHC/IO/FD.hs
+++ b/libraries/base/GHC/IO/FD.hs
@@ -3,7 +3,7 @@
, NoImplicitPrelude
, BangPatterns
#-}
-{-# OPTIONS_GHC -fno-warn-identities #-}
+{-# OPTIONS_GHC -Wno-identities #-}
-- Whether there are identities depends on the platform
{-# OPTIONS_HADDOCK hide #-}
diff --git a/libraries/base/GHC/IO/Handle.hs b/libraries/base/GHC/IO/Handle.hs
index ac37ad45f9..750dbf7a4d 100644
--- a/libraries/base/GHC/IO/Handle.hs
+++ b/libraries/base/GHC/IO/Handle.hs
@@ -4,7 +4,7 @@
, RecordWildCards
, NondecreasingIndentation
#-}
-{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+{-# OPTIONS_GHC -Wno-unused-matches #-}
-----------------------------------------------------------------------------
-- |
diff --git a/libraries/base/GHC/IO/Handle/Internals.hs b/libraries/base/GHC/IO/Handle/Internals.hs
index 37251abd06..581eb9bbfa 100644
--- a/libraries/base/GHC/IO/Handle/Internals.hs
+++ b/libraries/base/GHC/IO/Handle/Internals.hs
@@ -5,8 +5,8 @@
, NondecreasingIndentation
, RankNTypes
#-}
-{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
+{-# OPTIONS_GHC -Wno-unused-matches #-}
+{-# OPTIONS_GHC -Wno-name-shadowing #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/IO/Handle/Text.hs b/libraries/base/GHC/IO/Handle/Text.hs
index 88ec3c4e67..c31ab70a4a 100644
--- a/libraries/base/GHC/IO/Handle/Text.hs
+++ b/libraries/base/GHC/IO/Handle/Text.hs
@@ -6,8 +6,8 @@
, NondecreasingIndentation
, MagicHash
#-}
-{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
-{-# OPTIONS_GHC -fno-warn-unused-matches #-}
+{-# OPTIONS_GHC -Wno-name-shadowing #-}
+{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs
index 71de0d27d7..31381d6bd9 100644
--- a/libraries/base/GHC/Real.hs
+++ b/libraries/base/GHC/Real.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples, BangPatterns #-}
-{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
diff --git a/libraries/base/Text/Show/Functions.hs b/libraries/base/Text/Show/Functions.hs
index 690b203ea3..5230a4b4ca 100644
--- a/libraries/base/Text/Show/Functions.hs
+++ b/libraries/base/Text/Show/Functions.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE Safe #-}
-- This module deliberately declares orphan instances:
-{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
-----------------------------------------------------------------------------
-- |
diff --git a/libraries/ghc-prim/GHC/Classes.hs b/libraries/ghc-prim/GHC/Classes.hs
index 0e74bef07c..19192fb725 100644
--- a/libraries/ghc-prim/GHC/Classes.hs
+++ b/libraries/ghc-prim/GHC/Classes.hs
@@ -7,11 +7,11 @@
{-# LANGUAGE UndecidableSuperClasses #-}
-- Because of the type-variable superclasses for tuples
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
--- -fno-warn-unused-imports needed for the GHC.Tuple import below. Sigh.
+{-# OPTIONS_GHC -Wno-unused-imports #-}
+-- -Wno-unused-imports needed for the GHC.Tuple import below. Sigh.
-{-# OPTIONS_GHC -fno-warn-unused-top-binds #-}
--- -fno-warn-unused-top-binds is there (I hope) to stop Haddock complaining
+{-# OPTIONS_GHC -Wno-unused-top-binds #-}
+-- -Wno-unused-top-binds is there (I hope) to stop Haddock complaining
-- about the constraint tuples being defined but not used
{-# OPTIONS_HADDOCK hide #-}
diff --git a/mk/warnings.mk b/mk/warnings.mk
index f8db8fd35d..dd7967383a 100644
--- a/mk/warnings.mk
+++ b/mk/warnings.mk
@@ -32,15 +32,20 @@ SRC_CC_WARNING_OPTS += -Wno-unknown-pragmas
endif
-SRC_HC_WARNING_OPTS_STAGE1 += -fwarn-noncanonical-monad-instances
-SRC_HC_WARNING_OPTS_STAGE2 += -fwarn-noncanonical-monad-instances
+SRC_HC_WARNING_OPTS_STAGE1 += -Wnoncanonical-monad-instances
+SRC_HC_WARNING_OPTS_STAGE2 += -Wnoncanonical-monad-instances
######################################################################
# Disable some warnings in packages we use
+# NB: The GHC version used for bootstrapping may not support the
+# `-W`-aliases for `-f(no-)warn` flags introduced in GHC 8.0, so in
+# some cases (watch out for make-variables with a name containing
+# "boot") we need to pass the legacy `-f(no-)warn`-flags instead.
+
# Libraries that have dubious RULES
-libraries/bytestring_dist-install_EXTRA_HC_OPTS += -fno-warn-inline-rule-shadowing
+libraries/bytestring_dist-install_EXTRA_HC_OPTS += -Wno-inline-rule-shadowing
# Cabal doesn't promise to be warning-free
utils/ghc-cabal_dist_EXTRA_HC_OPTS += -w
@@ -48,47 +53,47 @@ libraries/Cabal/Cabal_dist-boot_EXTRA_HC_OPTS += -w
libraries/Cabal/Cabal_dist-install_EXTRA_HC_OPTS += -w
# Turn off import warnings for bad unused imports
-libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
-libraries/bytestring_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
-utils/haddock_dist_EXTRA_HC_OPTS += -fno-warn-unused-imports
-libraries/vector_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
+libraries/containers_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
+libraries/bytestring_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
+utils/haddock_dist_EXTRA_HC_OPTS += -Wno-unused-imports
+libraries/vector_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
# haddock's attoparsec uses deprecated `inlinePerformIO`
-utils/haddock_dist_EXTRA_HC_OPTS += -fno-warn-deprecations
+utils/haddock_dist_EXTRA_HC_OPTS += -Wno-deprecations
# containers uses bitSize at the moment
-libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-deprecations
-libraries/containers_dist-install_EXTRA_HC_OPTS += -fno-warn-redundant-constraints
+libraries/containers_dist-install_EXTRA_HC_OPTS += -Wno-deprecations
+libraries/containers_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
# On Windows, there are also some unused import warnings
ifeq "$(HostOS_CPP)" "mingw32"
-libraries/time_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports -fno-warn-identities
+libraries/time_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports -Wno-identities
endif
# haskeline has warnings about deprecated use of block/unblock
-libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-deprecations
-libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
-libraries/haskeline_dist-install_EXTRA_HC_OPTS += -fno-warn-redundant-constraints
+libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-deprecations
+libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
+libraries/haskeline_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
# binary upstream has some warnings, so don't use -Werror for it
libraries/binary_dist-boot_EXTRA_HC_OPTS += -Wwarn
libraries/binary_dist-install_EXTRA_HC_OPTS += -Wwarn
# temporarily turn off unused-imports warnings for pretty
-libraries/pretty_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
+libraries/pretty_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
# primitive has a warning about deprecated use of GHC.IOBase
-libraries/primitive_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
+libraries/primitive_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
# temporarily turn off unused-imports warnings for terminfo
libraries/terminfo_dist-boot_EXTRA_HC_OPTS += -fno-warn-unused-imports
-libraries/terminfo_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
+libraries/terminfo_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
# vector has some unused match warnings
libraries/vector_dist-install_EXTRA_HC_OPTS += -Wwarn
# temporarily turn off unused-imports warnings for xhtml
-libraries/xhtml_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-imports
+libraries/xhtml_dist-install_EXTRA_HC_OPTS += -Wno-unused-imports
libraries/dph/dph-base_dist-install_EXTRA_HC_OPTS += -Wwarn
libraries/dph/dph-prim-interface_dist-install_EXTRA_HC_OPTS += -Wwarn
@@ -98,16 +103,16 @@ libraries/dph/dph-lifted-common-install_EXTRA_HC_OPTS += -Wwarn
# transformers has unused function parameters warnings
libraries/transformers_dist-boot_EXTRA_HC_OPTS += -fno-warn-unused-matches -fno-warn-unused-imports
-libraries/transformers_dist-install_EXTRA_HC_OPTS += -fno-warn-unused-matches -fno-warn-unused-imports
-libraries/transformers_dist-install_EXTRA_HC_OPTS += -fno-warn-redundant-constraints
+libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-unused-matches -Wno-unused-imports
+libraries/transformers_dist-install_EXTRA_HC_OPTS += -Wno-redundant-constraints
# Turn of trustworthy-safe warning
-libraries/base_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
-libraries/ghc-prim_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
-libraries/Win32_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
+libraries/base_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe
+libraries/ghc-prim_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe
+libraries/Win32_dist-install_EXTRA_HC_OPTS += -Wno-trustworthy-safe
-# We need -fno-warn-deprecated-flags to avoid failure with -Werror
-GhcLibExtraHcOpts += -fno-warn-deprecated-flags
+# We need -Wno-deprecated-flags to avoid failure with -Werror
+GhcLibExtraHcOpts += -Wno-deprecated-flags
GhcBootLibExtraHcOpts += -fno-warn-deprecated-flags
# The warning suppression flag below is a temporary kludge. While working with
@@ -116,7 +121,7 @@ GhcBootLibExtraHcOpts += -fno-warn-deprecated-flags
# http://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
# for details
#
-GhcLibExtraHcOpts += -fno-warn-tabs
+GhcLibExtraHcOpts += -Wno-tabs
GhcBootLibExtraHcOpts += -fno-warn-tabs