From e764ede35f5c5b2c41e1670c6a9b831e0a70cd17 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 11 Mar 2016 10:41:30 +0100 Subject: Add ghc-flag directory for -XPatternGuards Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1987 --- docs/users_guide/glasgow_exts.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'docs') 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 `__. -(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 +`__. (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: :: -- cgit v1.2.1