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.
33 lines
898 B
Text
33 lines
898 B
Text
import Lean
|
|
|
|
open Lean Meta
|
|
|
|
def g : Nat → String := fun _ => ""
|
|
|
|
/--
|
|
info: String
|
|
[A]
|
|
-/
|
|
#guard_msgs in
|
|
run_meta do
|
|
withLetDecl `A (mkSort 1) (← mkArrow (mkConst ``Nat) (mkConst ``String)) fun A => do
|
|
withLetDecl `g A (mkConst ``g) fun g => do
|
|
let e := mkApp g (mkNatLit 0)
|
|
withTrackingZetaDelta do
|
|
IO.println (← ppExpr (← inferType e))
|
|
IO.println s!"{← (← getZetaDeltaFVarIds).toList.mapM fun x => ppExpr (mkFVar x)}"
|
|
|
|
/--
|
|
info: String
|
|
String
|
|
[A]
|
|
-/
|
|
#guard_msgs in
|
|
run_meta do
|
|
withLetDecl `A (mkSort 1) (← mkArrow (mkConst ``Nat) (mkConst ``String)) fun A => do
|
|
withLetDecl `g A (mkConst ``g) fun g => do
|
|
let e := mkApp g (mkNatLit 0)
|
|
IO.println (← ppExpr (← inferType e))
|
|
withTrackingZetaDelta do
|
|
IO.println (← ppExpr (← inferType e))
|
|
IO.println s!"{← (← getZetaDeltaFVarIds).toList.mapM fun x => ppExpr (mkFVar x)}"
|