-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new example to 58481 and rephrase some wording in index.md
- Loading branch information
1 parent
d9b88b9
commit 4ed7157
Showing
4 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{-# LANGUAGE PatternSynonyms #-} | ||
module Pattern where | ||
|
||
pattern Head x <- x:xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
module Pattern where | ||
|
||
pattern Head x <- x:xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Use of pattern synonyms without enabled language extension | ||
--- | ||
|
||
In this example the user declared a pattern synonym without enabling the `PatternSynonym` extension, which leads to this generic parsing error. | ||
|
||
``` | ||
messages/GHC-58481/example4/before/Pattern.hs:3:16: error: [GHC-58481] | ||
parse error on input ‘<-’ | ||
Suggested fix: Possibly caused by a missing 'do'? | ||
| | ||
3 | pattern Head x <- x:xs | ||
| ^^ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters