diff options
-rw-r--r-- | compiler/main/DynFlags.hs | 1 | ||||
-rw-r--r-- | compiler/types/OptCoercion.hs | 6 | ||||
-rw-r--r-- | docs/users_guide/8.0.1-notes.rst | 3 | ||||
-rw-r--r-- | docs/users_guide/using-warnings.rst | 11 | ||||
-rw-r--r-- | testsuite/tests/perf/compiler/T783.hs | 5 |
5 files changed, 8 insertions, 18 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index fcb954e275..29c142390d 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -3400,7 +3400,6 @@ optLevelFlags -- see Note [Documenting optimisation flags] standardWarnings :: [WarningFlag] standardWarnings -- see Note [Documenting warning flags] = [ Opt_WarnOverlappingPatterns, - Opt_WarnTooManyGuards, Opt_WarnWarningsDeprecations, Opt_WarnDeprecatedFlags, Opt_WarnDeferredTypeErrors, diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs index 41cec217d3..1038851d80 100644 --- a/compiler/types/OptCoercion.hs +++ b/compiler/types/OptCoercion.hs @@ -1,14 +1,10 @@ -- (c) The University of Glasgow 2006 {-# LANGUAGE CPP #-} -#if __GLASGOW_HASKELL__ > 710 -{-# OPTIONS_GHC -Wno-too-many-guards #-} -#endif -- This module used to take 10GB of memory to compile with the new -- (Nov '15) pattern-match check. In order to be able to compile it, -- do not enable -ffull-guard-reasoning. Instead, simplify the guards - -- (default behaviour when guards are too many) but suppress the - -- "too-many-guards" warning (-Werror is on). + -- (default behaviour when guards are too many). module OptCoercion ( optCoercion, checkAxInstCo ) where diff --git a/docs/users_guide/8.0.1-notes.rst b/docs/users_guide/8.0.1-notes.rst index 1e47d19649..08f4800690 100644 --- a/docs/users_guide/8.0.1-notes.rst +++ b/docs/users_guide/8.0.1-notes.rst @@ -248,8 +248,7 @@ Compiler - Added the ``-Wtoo-many-guards`` flag. When enabled, this will issue a warning if a pattern match contains too many guards (over 20 at the - moment). It is enabled by default but makes a difference only if pattern - match checking is also enabled. + moment). Makes a difference only if pattern match checking is also enabled. - Added the ``-ffull-guard-reasoning`` flag. When enabled, pattern match checking tries its best to reason about guards. Since the additional diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index 619f7011d7..bc126887fc 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -545,14 +545,15 @@ of ``-W(no-)*``. The option ``-Wtoo-many-guards`` warns about places where a pattern match contains too many guards (over 20 at the moment). - It is enabled by default but has an effect only if any form of - exhaustivness/overlapping checking is enabled (one of + It has an effect only if any form of exhaustivness/overlapping + checking is enabled (one of ``-Wincomplete-patterns``, ``-Wincomplete-uni-patterns``, ``-Wincomplete-record-updates``, - ``-Woverlapping-patterns``). The warning can be suppressed by - enabling either ``-Wno-too-many-guards``, which just hides the - warning, or ``-ffull-guard-reasoning``. + ``-Woverlapping-patterns``). When enabled, the warning can be + suppressed by enabling either ``-Wno-too-many-guards``, which just + hides the warning, or ``-ffull-guard-reasoning`` which runs the + full check, independently of the number of guards. ``-ffull-guard-reasoning`` .. index:: diff --git a/testsuite/tests/perf/compiler/T783.hs b/testsuite/tests/perf/compiler/T783.hs index cfd6b622ef..c3ea08d42a 100644 --- a/testsuite/tests/perf/compiler/T783.hs +++ b/testsuite/tests/perf/compiler/T783.hs @@ -1,8 +1,3 @@ -{-# LANGUAGE CPP #-} -#if __GLASGOW_HASKELL__ > 710 -{-# OPTIONS_GHC -Wno-too-many-guards #-} -#endif - module Test where foo :: Double -> Int |