summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2016-03-11 10:41:30 +0100
committerBen Gamari <ben@smart-cactus.org>2016-03-11 13:20:20 +0100
commite764ede35f5c5b2c41e1670c6a9b831e0a70cd17 (patch)
tree2f244f670fc351001502eb840a49bf17c7a932b8 /docs
parent6a2992dc4b6582bd95b0cef1a674a99ca8299403 (diff)
downloadhaskell-e764ede35f5c5b2c41e1670c6a9b831e0a70cd17.tar.gz
Add ghc-flag directory for -XPatternGuards
Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1987
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/glasgow_exts.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index dd714ece35..f46a6d6af9 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -385,11 +385,15 @@ instance, the binary integer literal ``0b11001001`` will be desugared into
Pattern guards
--------------
-Pattern guards (Glasgow extension) The discussion that follows is an
-abbreviated version of Simon Peyton Jones's original
-`proposal <http://research.microsoft.com/~simonpj/Haskell/guards.html>`__.
-(Note that the proposal was written before pattern guards were
-implemented, so refers to them as unimplemented.)
+.. ghc-flag:: -XPatternGuards
+
+ Enable pattern matches in guards.
+
+The discussion that follows is an abbreviated version of Simon Peyton Jones's
+original `proposal
+<http://research.microsoft.com/~simonpj/Haskell/guards.html>`__. (Note that the
+proposal was written before pattern guards were implemented, so refers to them
+as unimplemented.)
Suppose we have an abstract data type of finite maps, with a lookup
operation: ::