Skip to content

Commit a66913a

Browse files
committed
fix test
1 parent a4ed6a0 commit a66913a

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

MathlibTest/toAdditive.lean

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ example {x} (h : 1 = x) : baz20 = x := by simp; guard_target = 1 = x; exact h
180180
@[to_additive bar21]
181181
def foo21 {N} {A} [Pow A N] (a : A) (n : N) : A := a ^ n
182182

183-
run_meta do
184-
let some ⟨`Test.bar21, r, .arg 1⟩ := translations.find? (← getEnv) `Test.foo21 | failure
185-
guard <| r.isEmpty
183+
run_meta guard <| translations.find? (← getEnv) `Test.foo21
184+
matches some ⟨`Test.bar21, ⟨[], ⟨[], #[]⟩⟩, .arg 1
186185

187186
@[to_additive bar22]
188187
abbrev foo22 {α} [Monoid α] (a : α) : ℕ → α
@@ -838,10 +837,9 @@ instance : Mul (MonoidAlgebra Nat G) where
838837
def monoidAlgebraFoo {k G : Type} [Inhabited k] : MonoidAlgebra k G × Nat :=
839838
(⟨fun _ ↦ default⟩, 2)
840839

841-
run_meta do
842-
let some ⟨``addMonoidAlgebraFoo, r, .arg 1⟩ := translations.find? (← getEnv) ``monoidAlgebraFoo
843-
| failure
844-
guard <| r.isEmpty
840+
run_meta guard <|
841+
translations.find? (← getEnv) ``monoidAlgebraFoo
842+
matches some ⟨``addMonoidAlgebraFoo, ⟨[], ⟨[], #[]⟩⟩, .arg 1
845843

846844
/--
847845
warning: `to_additive` correctly autogenerated `(relevant_arg := 2)` for `monoidAlgebraFoo₁`.

0 commit comments

Comments
 (0)