lean4-htt/tests/lean/run/priority_test.lean
Sebastian Ullrich fd2c42a8bf chore(library, tests): switch to new attribute declaration syntax
sed -Ei 's/^(\s*)((private |protected )?(noncomputable )?(abbreviation|definition|meta_definition|theorem|lemma|proposition|corollary)\s+\S+\s*)((\s*\[(\S+(\s+[0-9]+)*|priority.*)\])+)\s*/\1attribute \6\n\1\2/' library/**/*.lean tests/**/*.lean
sed -Ei 's/\s+$//' library/**/*.lean  # remove trailing whitespace
2016-08-12 15:36:12 -07:00

22 lines
347 B
Text

open nat
structure foo [class] :=
(a : nat) (b : nat)
attribute [instance] [priority std.priority.default+1]
definition i1 : foo :=
foo.mk 1 1
attribute [instance]
definition i2 : foo :=
foo.mk 2 2
example : foo.a = 1 :=
rfl
attribute [instance] [priority std.priority.default+2]
definition i3 : foo :=
foo.mk 3 3
example : foo.a = 3 :=
rfl