summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPotato Hatsue <1793913507@qq.com>2021-06-21 03:53:39 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-22 02:36:00 -0400
commit62d720db4f6a53014400a608baf5c56555258eee (patch)
tree446925b4486863680a50f20c87845a08672417b7 /docs
parentf7e41d78d1f788290bee745d4d6532f7448caf8d (diff)
downloadhaskell-62d720db4f6a53014400a608baf5c56555258eee.tar.gz
Fix a typo in pattern synonyms doc
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/exts/pattern_synonyms.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/users_guide/exts/pattern_synonyms.rst b/docs/users_guide/exts/pattern_synonyms.rst
index 9415fb72b4..6055dffe8e 100644
--- a/docs/users_guide/exts/pattern_synonyms.rst
+++ b/docs/users_guide/exts/pattern_synonyms.rst
@@ -198,9 +198,9 @@ constructor can be used.
Usage Example
======================================= ==================================
As a constructor ``zero = Point 0 0``
-As a constructor with record syntax ``zero = Point { x = 0, y = 0}``
+As a constructor with record syntax ``zero = Point { x = 0, y = 0 }``
In a pattern context ``isZero (Point 0 0) = True``
-In a pattern context with record syntax ``isZero (Point { x = 0, y = 0 }``
+In a pattern context with record syntax ``isZero (Point { x = 0, y = 0 }) = True``
In a pattern context with field puns ``getX (Point {x}) = x``
In a record update ``(0, 0) { x = 1 } == (1,0)``
Using record selectors ``x (0,0) == 0``