Skip to content

Commit 426e88d

Browse files
committed
Make suggested changes to GHC-09646 docs
1 parent 25bc320 commit 426e88d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

message-index/messages/GHC-09646/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ severity: error
55
introduced: 9.6.1
66
---
77

8-
Pattern matching allows constructors and literals to be used to take apart values, exposing their contents. The syntax of patterns is very similar to that of the expressions that create values, but many constructs that are allowed in expression contexts are not meaningful patterns.
8+
[Tuple sections](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/tuple_sections.html) are a concise syntax for functions that result in tuples. The missing expressions in the tuple become arguments to the function. Because tuple sections always result in functions, and functions cannot be matched in patterns, tuple sections are not allowed in patterns.
99

1010
## Example Text
1111

message-index/messages/GHC-09646/snd/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Using tuple section in pattern
33
---
44

5-
When pattern matching, tuple sections are not allowed as patterns to be matched against. In the example below, we can fix this by adding the wildcard _ to match on the first element of the pair.
5+
When pattern matching, tuple sections are not allowed as patterns to be matched against. In the example below, one of the components of a tuple pattern was forgotten. We can fix this by adding the wildcard _ to match on the first element of the pair.
66

77
# Error Message
88

0 commit comments

Comments
 (0)