Skip to content

Commit 66f30c6

Browse files
David Binderdavid-christiansen
andauthored
Update message-index/messages/GHC-07626/example/index.md
Co-authored-by: David Thrane Christiansen <[email protected]>
1 parent 5e4a58c commit 66f30c6

File tree

1 file changed

+1
-1
lines changed
  • message-index/messages/GHC-07626/example

1 file changed

+1
-1
lines changed

message-index/messages/GHC-07626/example/index.md

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

5-
This error occurs because we haven’t properly pattern matched on the list in our definition of the merge function. The type here is a list, which means our options are to match on either the empty list, [], or a list with head and tail, (a:as). By omitting the parentheses around a:as, the compiler reads this as an argument, a, followed by a misplaced infix cons (:) operator.
5+
This error occurs because we haven’t properly pattern matched on the list in our definition of the `merge` function. In particular, the parentheses are missing. The type here is a list, which means our options are to match on either the empty list, `[]`, or a list with head and tail, `(a:as)`. By omitting the parentheses around `a:as`, the compiler reads this as an argument, `a`, followed by a misplaced infix cons `(:)` operator, rather than considering the `:` to be part of the list being matched.
66

77
# Error Message
88
```

0 commit comments

Comments
 (0)