summaryrefslogtreecommitdiff
path: root/docs/users_guide/exts/empty_case.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/users_guide/exts/empty_case.rst')
-rw-r--r--docs/users_guide/exts/empty_case.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/users_guide/exts/empty_case.rst b/docs/users_guide/exts/empty_case.rst
index c42de22e9e..7a32f609e6 100644
--- a/docs/users_guide/exts/empty_case.rst
+++ b/docs/users_guide/exts/empty_case.rst
@@ -19,6 +19,9 @@ or ::
\case { } -- -XLambdaCase is also required
+Note that it is not allowed for ``\cases``, since it would be unclear how many
+patterns are being matched.
+
This can be useful when you know that the expression being scrutinised
has no non-bottom values. For example:
@@ -45,5 +48,3 @@ We much prefer (B). Why? Because GHC can figure out that
is able to compile with :ghc-flag:`-Wincomplete-patterns` and
:ghc-flag:`-Werror`. On the other hand (A) looks dangerous, and GHC doesn't
check to make sure that, in fact, the function can never get called.
-
-