diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-11-03 16:17:35 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-11-03 16:17:42 -0600 |
commit | 987d542749be3b53d8461fa5abb770f0b9d8ba5e (patch) | |
tree | 8d389b3a8d3f7f715ca95c1d532dab82d897a0ae | |
parent | 334fe4500c234e83f250f74679f7bbe20208abba (diff) | |
download | haskell-987d542749be3b53d8461fa5abb770f0b9d8ba5e.tar.gz |
Build system: renable -Wall on validate (base)
Problem: 'SRC_HC_OPTS += -Wall' in 'mk/warnings.mk' was getting
overwritten by 'SRC_HC_OPTS = ...' in 'mk/flavours/*.mk'.
It didn't affect the compiler or most other libraries, because most
.cabal files define 'ghc-options: -Wall'.
Bug introduced in commit
2c24fd707f8650205bb574ffac5f376239af3723, when moving validate settings
from 'mk/validate-settings.mk' to 'mk/flavours/validate.mk'.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D1425
-rw-r--r-- | ghc.mk | 8 | ||||
-rw-r--r-- | libraries/base/Data/Semigroup.hs | 1 | ||||
-rw-r--r-- | libraries/base/GHC/Enum.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/GHCi.hs | 2 | ||||
-rw-r--r-- | mk/warnings.mk | 3 |
5 files changed, 10 insertions, 6 deletions
@@ -142,6 +142,14 @@ include mk/warnings.mk # (Optional) build-specific configuration include mk/custom-settings.mk +SRC_CC_OPTS += -Wall +SRC_HC_OPTS += -Wall +# Don't add -Werror to GhcStage1HcOpts, because otherwise validate may +# unnecessarily fail during the stage1 build when booting with an older +# compiler. +# It would be better to only exclude certain warnings from becoming errors +# (e.g. '-Werror -Wno-error=unused-imports -Wno-error=...'), but -Wno-error +# isn't supported yet (https://ghc.haskell.org/trac/ghc/wiki/Design/Warnings). SRC_CC_OPTS += $(WERROR) GhcStage2HcOpts += $(WERROR) GhcLibHcOpts += $(WERROR) diff --git a/libraries/base/Data/Semigroup.hs b/libraries/base/Data/Semigroup.hs index 6c92df9343..0cd556d6fc 100644 --- a/libraries/base/Data/Semigroup.hs +++ b/libraries/base/Data/Semigroup.hs @@ -78,7 +78,6 @@ import Data.Monoid (All (..), Any (..), Dual (..), Endo (..), Product (..), Sum (..)) import Data.Monoid (Alt (..)) import qualified Data.Monoid as Monoid -import Data.Proxy import Data.Void import GHC.Generics diff --git a/libraries/base/GHC/Enum.hs b/libraries/base/GHC/Enum.hs index 0d91cc7cbc..dcda47b9fb 100644 --- a/libraries/base/GHC/Enum.hs +++ b/libraries/base/GHC/Enum.hs @@ -704,7 +704,7 @@ the special case varies more from the general case, due to the issue of overflow {-# NOINLINE [0] enumDeltaIntegerFB #-} enumDeltaIntegerFB :: (Integer -> b -> b) -> Integer -> Integer -> b -enumDeltaIntegerFB c x d = go x +enumDeltaIntegerFB c x0 d = go x0 where go x = x `seq` (x `c` go (x+d)) {-# NOINLINE [1] enumDeltaInteger #-} diff --git a/libraries/base/GHC/GHCi.hs b/libraries/base/GHC/GHCi.hs index 56874a5a12..514a33cc13 100644 --- a/libraries/base/GHC/GHCi.hs +++ b/libraries/base/GHC/GHCi.hs @@ -21,7 +21,7 @@ module GHC.GHCi {-# WARNING "This is an unstable interface." #-} ( GHCiSandboxIO(..), NoIO() ) where -import GHC.Base (IO(), Monad, Functor(fmap), Applicative(..), (>>=), return, id, (.), ap) +import GHC.Base (IO(), Monad, Functor(fmap), Applicative(..), (>>=), id, (.), ap) -- | A monad that can execute GHCi statements by lifting them out of -- m into the IO monad. (e.g state monads) diff --git a/mk/warnings.mk b/mk/warnings.mk index 2e824288c8..267aef6a36 100644 --- a/mk/warnings.mk +++ b/mk/warnings.mk @@ -25,9 +25,6 @@ SRC_CC_WARNING_OPTS += -Wno-unknown-pragmas endif -SRC_CC_OPTS += -Wall -SRC_HC_OPTS += -Wall - GhcStage1HcOpts += -fwarn-tabs GhcStage2HcOpts += -fwarn-tabs |