By having the `pp.proofs` feature use `⋯` when omitting proofs, when users copy/paste terms from the InfoView the elaborator can give an error message explaining why the term cannot be elaborated. Also adds `pp.proofs.threshold` option to allow users to pretty print shallow proof terms. By default, only atomic proof terms are pretty printed. This adjustment was suggested in PR #3201, which added `⋯` and the related `pp.deepTerms` option.
24 lines
661 B
Text
24 lines
661 B
Text
/-!
|
||
# Tests for the `pp.proofs` option
|
||
-/
|
||
|
||
section
|
||
set_option pp.analyze.trustSubst true
|
||
set_option pp.proofs false
|
||
example (h : α = β) : h ▸ (a : α) = (b : β) := _
|
||
example (h : α = β) : id h ▸ (a : α) = (b : β) := _
|
||
example (h : α = β) : id h ▸ (a : α) = (b : β) := by simp (config := { failIfUnchanged := false })
|
||
set_option pp.proofs.withType false
|
||
example (h : α = β) : id h ▸ (a : α) = (b : β) := _
|
||
set_option pp.proofs true
|
||
example (h : α = β) : id h ▸ (a : α) = (b : β) := _
|
||
end
|
||
|
||
/-!
|
||
Testing threshold option
|
||
-/
|
||
section
|
||
#check let _ := Nat.le_succ 1; 0
|
||
set_option pp.proofs.threshold 10
|
||
#check let _ := Nat.le_succ 1; 0
|
||
end
|