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

elab_rules : tactic patterns require redundant information #1348

Open
leodemoura opened this issue Jul 21, 2022 · 2 comments
Open

elab_rules : tactic patterns require redundant information #1348

leodemoura opened this issue Jul 21, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@leodemoura
Copy link
Member

import Lean

syntax "foo " str : tactic

open Lean Elab
elab_rules : tactic
  | `(foo $x:str) => logInfo x.getString

example : True := by
 foo "hello"  -- Error `tacticFoo_` has not been implemented

One has to write the elab_rules above as

elab_rules : tactic
  | `(tactic| foo $x:str) => logInfo x.getString
@Vtec234
Copy link
Member

Vtec234 commented Jul 22, 2022

I just ran into this as well. I think Tactic should be TSyntax `tactic -> TacticM Unit rather than Syntax -> TacticM Unit.

@Kha
Copy link
Member

Kha commented Jul 22, 2022

@Vtec234 It should, but in order to generate a type error here we would also have to fix Macro as mentioned in #1251

@leodemoura leodemoura added the enhancement New feature or request label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants