-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re #7136: allow {x = x} (same name) in pattern syn defs
This is allowed by accident since Agda 2.6.0, so we continue to support it.
- Loading branch information
1 parent
129a6db
commit 0def258
Showing
2 changed files
with
48 additions
and
29 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
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,15 @@ | ||
-- Andreas, 2024-02-20, issue #7136: | ||
-- Error out on unsupported pattern synonym arguments. | ||
|
||
data C : Set where | ||
c : C → C | ||
|
||
-- This special case of named arguments in pattern lhss sneaked in by accident | ||
-- into Agda 2.6.0, so we continue to support it. | ||
|
||
pattern p {x = x} = c x | ||
|
||
test : C → C | ||
test (p {x = y}) = y | ||
|
||
-- Should be accepted |