summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-warnings.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/users_guide/using-warnings.rst')
-rw-r--r--docs/users_guide/using-warnings.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 353c1a07ca..acb9303555 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -860,8 +860,8 @@ of ``-W(no-)*``.
.. ghc-flag:: -Wincomplete-uni-patterns
- :shortdesc: warn when a pattern match in a lambda expression or
- pattern binding could fail
+ :shortdesc: warn when a pattern match in a lambda expression,
+ pattern binding or a lazy pattern could fail
:type: dynamic
:reverse: -Wno-incomplete-uni-patterns
:category:
@@ -874,6 +874,10 @@ of ``-W(no-)*``.
h = \[] -> 2
Just k = f y
+ Furthermore, this flag also applies to lazy patterns, since they are
+ syntactic sugar for pattern bindings. For example, ``f ~(Just x) = (x,x)``
+ is equivalent to ``f y = let Just x = y in (x,x)``.
+
.. ghc-flag:: -fmax-pmcheck-models=⟨n⟩
:shortdesc: soft limit on the number of parallel models the pattern match
checker should check a pattern match clause against