8000 chore: remove staging workarounds by leodemoura · Pull Request #8908 · leanprover/lean4 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: remove staging workarounds #8908

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

Merged
merged 1 commit into from
Jun 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Init/Grind/Tactics.lean
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ syntax grindEq := "=" (grindGen)?
syntax grindEqBoth := atomic("_" "=" "_") (grindGen)?
syntax grindEqRhs := atomic("=" "_") (grindGen)?
syntax grindEqBwd := atomic("←" "=") <|> atomic("<-" "=")
syntax grindBwd := ("← " <|> "←" <|> "<-") (grindGen)? -- TODO remove "← " after update stage 0
syntax grindFwd := "→ " <|> "→" <|> "->" -- TODO remove "→ " after update stage 0
syntax grindBwd := ("←" <|> "<-") (grindGen)?
syntax grindFwd := "→" <|> "->"
syntax grindRL := "⇐" <|> "<="
syntax grindLR := "⇒" <|> "=>"
syntax grindUsr := &"usr"
Expand Down
9 changes: 1 addition & 8 deletions src/Lean/Meta/Tactic/Grind/Attr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,7 @@ def getAttrKindCore (stx : Syntax) : CoreM AttrKind := do
| `(Parser.Attr.grindMod|cases eager) => return .cases true
| `(Parser.Attr.grindMod|intro) => return .intro
| `(Parser.Attr.grindMod|ext) => return .ext
| _ =>
-- TODO: remove after update stage0
let stx := stx[0]
if stx.isOfKind ``Parser.Attr.grindFwd then return .ematch .fwd
if stx.isOfKind ``Parser.Attr.grindBwd then return .ematch (.bwd false)
if stx.isOfKind ``Parser.Attr.grindRL then return .ematch .rightLeft
if stx.isOfKind ``Parser.Attr.grindLR then return .ematch .leftRight
throwError "unexpected `grind` theorem kind: `{stx}`"
| _ => throwError "unexpected `grind` theorem kind: `{stx}`"

/-- Return theorem kind for `stx` of the form `(Attr.grindMod)?` -/
def getAttrKindFromOpt (stx : Syntax) : CoreM AttrKind := do
Expand Down
32 changes: 32 additions & 0 deletions tests/lean/run/grind_pp_attr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,35 @@ example :=
-/
#guard_msgs in
run_cmd test (← `(@[grind _=_] example := 0))

/--
info: @[grind =_]
example :=
0
-/
#guard_msgs in
run_cmd test (← `(@[grind =_] example := 0))

/--
info: @[grind →]
example :=
0
-/
#guard_msgs in
run_cmd test (← `(@[grind →] example := 0))

/--
info: @[grind ←]
example :=
0
-/
#guard_msgs in
run_cmd test (← `(@[grind ←] example := 0))

/--
info: @[grind ←=]
example :=
0
-/
#guard_msgs in
run_cmd test (← `(@[grind ←=] example := 0))
Loading
0