lean4-htt/tests/elab/instanceReducible.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

38 lines
1 KiB
Text

module
/-! Applying `[instance]` after the fact should check for appropriate reducibility. -/
public def unexposed : Inhabited Nat := inferInstance
/-- warning: instance `unexposed` must be marked with `@[expose]` -/
#guard_msgs in
attribute [instance] unexposed
/-- warning: instance `unexposed` must be marked with `@[reducible]` or `@[implicit_reducible]` -/
#guard_msgs in
attribute [local instance] unexposed
@[expose]
public def exposed : Inhabited Nat := inferInstance
/-- warning: instance `exposed` must be marked with `@[reducible]` or `@[implicit_reducible]` -/
#guard_msgs in
attribute [instance] exposed
/-- warning: instance `exposed` must be marked with `@[reducible]` or `@[implicit_reducible]` -/
#guard_msgs in
attribute [local instance] exposed
@[expose, implicit_reducible]
public def exposedAndReducible : Inhabited Nat := inferInstance
#guard_msgs in
attribute [instance] exposedAndReducible
#guard_msgs in
attribute [local instance] exposedAndReducible
instance bla : Add Int := ⟨Int.add⟩
#guard_msgs in
attribute [irreducible] bla