summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-optimisation.rst
diff options
context:
space:
mode:
authorDavid Luposchainsky <dluposchainsky@gmail.com>2016-04-17 14:41:33 +0200
committerBen Gamari <ben@smart-cactus.org>2016-04-17 14:42:15 +0200
commit7005b9f7b0f4db0c0401156557bd4988d0efd569 (patch)
tree5972d7eba8f412e4b5626d80cf8819f7944f7841 /docs/users_guide/using-optimisation.rst
parent07dc330736103eee4b94607ef488b3578155f82b (diff)
downloadhaskell-7005b9f7b0f4db0c0401156557bd4988d0efd569.tar.gz
Add flag to control number of missing patterns in warnings
Non-exhaustive pattern warnings had their number of patterns to show hardcoded in the past. This patch implements the TODO remark that this should be made a command line flag. -fmax-uncovered-patterns=<n> can now be used to influence the number of patterns to be shown. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2076
Diffstat (limited to 'docs/users_guide/using-optimisation.rst')
-rw-r--r--docs/users_guide/using-optimisation.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 5e4995d968..943651001a 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -120,7 +120,7 @@ list.
case x of
Red -> e1
- _ -> case x of
+ _ -> case x of
Blue -> e2
Green -> e3
@@ -353,6 +353,13 @@ list.
they may be numerous), but ``-fno-max-relevant-bindings`` includes
them too.
+.. ghc-flag:: -fmax-uncovered-patterns=<n>
+
+ :default: 4
+
+ Maximum number of unmatched patterns to be shown in warnings generated by
+ :ghc-flag:`-Wincomplete-patterns` and :ghc-flag:`-Wincomplete-uni-patterns`.
+
.. ghc-flag:: -fmax-simplifier-iterations=<n>
:default: 4