lean4-htt/src/Lean/PrettyPrinter
Kyle Miller 9cb114eb83
feat: add pp.mvars and pp.mvars.withType (#3798)
* Setting `pp.mvars` to false causes metavariables to pretty print as
`?_`.
* Setting `pp.mvars.withType` to true causes metavariables to pretty
print with type ascriptions.

Motivation: when making tests, it is inconvenient using `#guard_msgs`
when there are metavariables, since the unique numbering is subject to
change.

This feature does not use `⋯` omissions since a metavariable is already
in a sense an omitted term. If repeated metavariables do not appear in
an expression, there is a chance that a term pretty printed with
`pp.mvars` set to false can still elaborate to the correct term, unlike
for other omissions.

(In the future we could consider an option that pretty prints uniquely
numbered metavariables as `?m✝`, `?m✝¹`, `?m✝²`, etc. to be able to tell
them apart, at least in the same pretty printed expression. It would
take care to make sure that these names are stable across different
hovers.)

Closes #3781
2024-03-29 18:03:05 +00:00
..
Delaborator feat: add pp.mvars and pp.mvars.withType (#3798) 2024-03-29 18:03:05 +00:00
Basic.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Delaborator.lean perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Formatter.lean feat: custom error recovery in parser (#3413) 2024-02-21 14:29:54 +00:00
Parenthesizer.lean feat: custom error recovery in parser (#3413) 2024-02-21 14:29:54 +00:00