lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

server sync bug in syntax quotations

Open digama0 opened this issue 1 year ago • 0 comments

MWE:

import Lean

elab (ident)? ("Foo") : command => sorry

syntax "Fix " colGt ident : tactic

example (x : Lean.TSyntax `ident) : Lean.MacroM Lean.Syntax :=
  `(tactic| Fix $x:iden)
                    -- ^ insert a 't' here

As written, the example produces three parse errors, on the $, the : and the ). Inserting t to complete the word ident makes the example correct (which can be confirmed by compiling on the command line), but in the server it continues to report errors on the $ and the ). Removing and re-adding :ident makes the error go away, and removing and re-adding ident makes it come back.

Tested on leanprover/lean4:v4.9.0-rc3.

digama0 avatar Jul 15 '24 15:07 digama0