summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyd Parser <cydparser@gmail.com>2017-08-06 22:23:23 -0700
committerBen Gamari <ben@smart-cactus.org>2017-08-07 19:22:59 -0400
commit14457cf6a50f708eecece8f286f08687791d51f7 (patch)
tree621e8610872006b0c297862718a3759bd79bf0d2
parent2f29f198bfd04aadfae3b5a6152c855f9bb999d6 (diff)
downloadhaskell-14457cf6a50f708eecece8f286f08687791d51f7.tar.gz
Fix EmptyCase documentation
-rw-r--r--docs/users_guide/glasgow_exts.rst11
1 files changed, 5 insertions, 6 deletions
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index d50dd40d53..bc09402668 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -1701,8 +1701,8 @@ example, consider these two candidate definitions of ``absurd``:
::
- data a :==: b where
- Refl :: a :==: a
+ data a :~: b where
+ Refl :: a :~: a
absurd :: True :~: False -> a
absurd x = error "absurd" -- (A)
@@ -1710,10 +1710,9 @@ example, consider these two candidate definitions of ``absurd``:
We much prefer (B). Why? Because GHC can figure out that
``(True :~: False)`` is an empty type. So (B) has no partiality and GHC
-should be able to compile with :ghc-flag:`-Wincomplete-patterns`. (Though
-the pattern match checking is not yet clever enough to do that.) On the
-other hand (A) looks dangerous, and GHC doesn't check to make sure that,
-in fact, the function can never get called.
+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.
.. _multi-way-if: