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.
44 lines
616 B
Text
44 lines
616 B
Text
import Lean
|
|
|
|
|
|
|
|
structure A :=
|
|
(x : Nat := 10)
|
|
|
|
def f : A :=
|
|
{ }
|
|
|
|
theorem ex : f = { x := 10 } :=
|
|
rfl
|
|
|
|
#check f
|
|
|
|
syntax (name := emptyS) "⟨" "⟩" : term -- overload `⟨ ⟩` notation
|
|
|
|
open Lean
|
|
open Lean.Elab
|
|
open Lean.Elab.Term
|
|
|
|
@[term_elab emptyS] def elabEmptyS : TermElab :=
|
|
fun stx expectedType? => do
|
|
tryPostponeIfNoneOrMVar expectedType?
|
|
let stxNew ← `(Nat.zero)
|
|
withMacroExpansion stx stxNew $
|
|
elabTerm stxNew expectedType?
|
|
|
|
def foo (x : Unit) := x
|
|
|
|
def f1 : Unit :=
|
|
let x := ⟨ ⟩
|
|
foo x
|
|
|
|
def f2 : Unit :=
|
|
let x := ⟨ ⟩
|
|
x
|
|
|
|
def f3 : Nat :=
|
|
let x := ⟨ ⟩
|
|
x
|
|
|
|
theorem ex2 : f3 = 0 :=
|
|
rfl
|