Comments (3)
Apparently, named arguments in pattern
lhss are already discarded (silently!) in the parser. The concrete syntax only has one name per lhs argument:
agda/src/full/Agda/Syntax/Concrete.hs
Line 481 in 3503636
agda/src/full/Agda/Syntax/Parser/Parser.y
Lines 1369 to 1370 in 3503636
The culprit is then the
patternSynArgs
function in the parser: agda/src/full/Agda/Syntax/Parser/Parser.y
Lines 2368 to 2378 in 3503636
Named arguments were never supported in pattern synonym definitions; the initial implementation for hidden patsyn parameters only has an example for an unnamed hidden parameter: c935600
Agda < 2.6 rejects to parse them (correct behavior), Agda 2.6.0 and up parses them but can't use them (bad behavior). Thus, this is a regression in 2.6.0.
from agda.
Agda also silently discards tactic
attributes in pattern
definitions:
open import Agda.Builtin.Nat
open import Agda.Builtin.Reflection
open import Agda.Builtin.Unit
nothing : Term → TC ⊤
nothing hole = returnTC _
pattern p {@(tactic nothing) x} = suc x
-- Accepted, but should complain about tactics not being allowed in pattern synonyms
from agda.
It should maybe also not allow erasure annotations in pattern synonyms...
{-# OPTIONS --erasure #-}
open import Agda.Builtin.Nat
pattern p (@0 x) = suc x
-- should be rejected!
pred : Nat → Nat
pred (p x) = x
pred zero = zero
from agda.
Related Issues (20)
- Instance resolution failure in Agda 2.6.4 HOT 6
- Mimer drops part of the solution with module parameter
- Citation.cff HOT 1
- Prune the `Makefile` HOT 7
- Delete the GitHub Wiki HOT 3
- Migrate the Chalmers Wiki HOT 4
- Prune `Setup.hs` HOT 5
- Reorganize `HACKING.md`
- Merge `.authorspellings` and `.mailmap` HOT 1
- Mimer internal error when querying `recRecursive` HOT 1
- Interactive highlighting remnants with lambda-where
- Automatically create names for syntax
- Mangled trX/Con clause for indexed type with green slime HOT 1
- Why do we `reduce` and `instantiateFull` constraints? HOT 2
- Use of Non-terminating Function in Data Declaration Makes Typechecker Loop HOT 4
- Misprinted domain-free parameters with cohesion attribute HOT 1
- Regression in 2.6.4.2 concerning `with` HOT 6
- Regression in 2.6.4 in `rewrite` with instances
- Feature request: Allow for overloading function application (the 'whitespace' operator) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agda.