Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notations do not always work in pattern-matching #81

Closed
anton-trunov opened this issue Apr 28, 2018 · 2 comments
Closed

Notations do not always work in pattern-matching #81

anton-trunov opened this issue Apr 28, 2018 · 2 comments

Comments

@anton-trunov
Copy link
Contributor

The following snippet produces an error message.

Require Import Coq.Lists.List.
Import ListNotations.
From Equations Require Import Equations.

Equations app {A} (l l' : list A) : list A :=
app [] l' := l' ;                                  (* <- here notations work *)
app (a :: l) l' := a :: (app l l').

The error message is

Error: Syntax error: ')' expected after [lpatt] (in [patt]).

It works if I change (a :: l) with cons a l.

Tested with Coq 8.8.0, Equations 1.0, both installed via OPAM.

@mattam82
Copy link
Owner

mattam82 commented Jun 8, 2018

Yes, this is not easy to fix, I basically need to extend the pattern parser of Coq.

@mattam82
Copy link
Owner

mattam82 commented Jan 3, 2019

This is now fixed in master, one can use notations freely in patterns.

@mattam82 mattam82 closed this as completed Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants