From 7005b9f7b0f4db0c0401156557bd4988d0efd569 Mon Sep 17 00:00:00 2001 From: David Luposchainsky Date: Sun, 17 Apr 2016 14:41:33 +0200 Subject: 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= 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 --- docs/users_guide/using-optimisation.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'docs/users_guide/using-optimisation.rst') 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= + + :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= :default: 4 -- cgit v1.2.1