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
19 lines
264 B
Text
19 lines
264 B
Text
section foo
|
|
parameter A : Type
|
|
variable a : A
|
|
definition foo := a
|
|
|
|
check foo
|
|
|
|
structure point [class] :=
|
|
(x : A) (y : A)
|
|
end foo
|
|
|
|
check foo
|
|
|
|
attribute [instance]
|
|
definition point_nat : point nat :=
|
|
point.mk nat.zero nat.zero
|
|
|
|
print classes
|
|
check point
|