lean4-htt/tests/lean/eraseInsts.lean
2021-08-31 15:30:29 -07:00

15 lines
230 B
Text

structure Foo where
a : Nat
instance fooAdd : Add Foo where
add x y := ⟨x.a + y.a⟩
def f1 (a b : Foo) := a + b
section
attribute [-instance] fooAdd
def f2 (a b : Foo) := a + b -- Error
end
def f3 (a b : Foo) := a + b