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.
30 lines
740 B
Text
30 lines
740 B
Text
import Lean.Elab.Command
|
||
import Lean.Elab.Open
|
||
/-!
|
||
Issue #2291
|
||
|
||
The following example would cause the pretty printer to panic.
|
||
-/
|
||
|
||
set_option trace.Compiler.simp true in
|
||
#eval [0]
|
||
|
||
|
||
/-!
|
||
Fixing the above involved changing `Lean.unresolveNameGlobal`.
|
||
Here, we also verify that we do not pretty print using any aliases that have macro scopes.
|
||
-/
|
||
|
||
open Lean in
|
||
elab "add_bad_alias " n:ident : command => withFreshMacroScope do
|
||
let declName ← Elab.OpenDecl.resolveNameUsingNamespaces [← getCurrNamespace] n
|
||
let badName ← MonadQuotation.addMacroScope `bad
|
||
modify fun s => { s with env := addAlias s.env badName declName }
|
||
|
||
def f := 1
|
||
|
||
add_bad_alias f
|
||
|
||
-- Formerly was info: bad✝ : ℕ
|
||
/-- info: f : Nat -/
|
||
#guard_msgs in #check (f)
|