Skip to content

Commit 06ff69c

Browse files
committed
fix
1 parent 8735447 commit 06ff69c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Lean/Elab/Tactic/Grind.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ def elabGrindPattern : CommandElab := fun stx => do
3333
| _ => throwUnsupportedSyntax
3434
where
3535
go (thmName : TSyntax `ident) (terms : Syntax.TSepArray `term ",") (kind : AttributeKind) : CommandElabM Unit := liftTermElabM do
36-
let declName ← resolveGlobalConstNoOverload thmName
37-
discard <| addTermInfo thmName (← mkConstWithLevelParams declName)
36+
let declName ← realizeGlobalConstNoOverloadWithInfo thmName
3837
let info ← getConstVal declName
3938
forallTelescope info.type fun xs _ => do
4039
let patterns ← terms.getElems.mapM fun term => do

tests/lean/run/grind_10426.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/-!
2+
# Test that `grind_pattern` causes realizations
3+
-/
4+
5+
def f (n : Nat) : Prop := sorry
6+
def g (n : Nat) : Prop := sorry
7+
8+
def fg (n : Nat) := f n ∧ g n
9+
10+
grind_pattern fg.eq_def => fg n

0 commit comments

Comments
 (0)