summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-warnings.rst
diff options
context:
space:
mode:
authorGeorge Karachalias <george.karachalias@gmail.com>2016-02-01 11:43:12 +0100
committerGeorge Karachalias <george.karachalias@gmail.com>2016-02-01 11:43:12 +0100
commitb5df2cc6cf2af4508a4f34a718320a6d79f9adca (patch)
tree525e975eaf60e0200555e7f269fd79b7eaeb227d /docs/users_guide/using-warnings.rst
parenta883c1b7b08657102a2081b55c8fe68714d8bf73 (diff)
downloadhaskell-wip/gadtpm.tar.gz
Overhaul the Overhauled Pattern Match Checkerwip/gadtpm
* Changed the representation of Value Set Abstractions. Instead of using a prefix tree, we now use a list of Value Vector Abstractions. The set of constraints Delta for every Value Vector Abstraction is the oracle state so that we solve everything only once. * Instead of doing everything lazily, we prune at once (and in general everything is much stricter). A case writtern with pattern guards is not checked in almost the same time as the equivalent with pattern matching. * Do not store the covered and the divergent sets at all. Since what we only need is a yes/no (does this clause cover anything? Does it force any thunk?) We just keep a boolean for each. * Removed flags `-Wtoo-many-guards` and `-ffull-guard-reasoning`. Replaced with `fmax-pmcheck-iterations=n`. Still debatable what should the default `n` be. * When a guard is for sure not going to contribute anything, we treat it as such: The oracle is not called and cases `CGuard`, `UGuard` and `DGuard` from the paper are not happening at all (the generation of a fresh variable, the unfolding of the pattern list etc.). his combined with the above seems to be enough to drop the memory increase for test T783 down to 18.7%. * Do not export function `dsPmWarn` (it is now called directly from within `checkSingle` and `checkMatches`). * Make `PmExprVar` hold a `Name` instead of an `Id`. The term oracle does not handle type information so using `Id` was a waste of time/space. * Added testcases T11195, T11303b (data families) and T11374 The patch addresses at least the following: #11195, #11276, #11303, #11374, #11162
Diffstat (limited to 'docs/users_guide/using-warnings.rst')
-rw-r--r--docs/users_guide/using-warnings.rst34
1 files changed, 0 insertions, 34 deletions
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index afcee5b5d7..7fd2019cc6 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -527,40 +527,6 @@ of ``-W(no-)*``.
This option isn't enabled by default because it can be very noisy,
and it often doesn't indicate a bug in the program.
-.. ghc-flag:: -Wtoo-many-guards
- -Wno-too-many-guards
-
- .. index::
- single: too many guards, warning
-
- The option :ghc-flag:`-Wtoo-many-guards` warns about places where a
- pattern match contains too many guards (over 20 at the moment).
- It has an effect only if any form of exhaustivness/overlapping
- checking is enabled (one of
- :ghc-flag:`-Wincomplete-patterns`,
- :ghc-flag:`-Wincomplete-uni-patterns`,
- :ghc-flag:`-Wincomplete-record-updates`,
- :ghc-flag:`-Woverlapping-patterns`). When enabled, the warning can be
- suppressed by enabling either :ghc-flag:`-Wno-too-many-guards`, which just
- hides the warning, or :ghc-flag:`-ffull-guard-reasoning` which runs the
- full check, independently of the number of guards.
-
-.. ghc-flag:: -ffull-guard-reasoning
-
- :implies: :ghc-flag:`-Wno-too-many-guards`
-
- .. index::
- single: guard reasoning, warning
-
- The option :ghc-flag:`-ffull-guard-reasoning` forces pattern match checking
- to run in full. This gives more precise warnings concerning pattern
- guards but in most cases increases memory consumption and
- compilation time. Hence, it is off by default. Enabling
- :ghc-flag:`-ffull-guard-reasoning` also implies :ghc-flag:`-Wno-too-many-guards`.
- Note that (like :ghc-flag:`-Wtoo-many-guards`) :ghc-flag:`-ffull-guard-reasoning`
- makes a difference only if pattern match checking is already
- enabled.
-
.. ghc-flag:: -Wmissing-fields
.. index::