lean4-htt/tests/lean/linterSuspiciousUnexpanderPatterns.lean
2022-07-29 10:31:19 -07:00

12 lines
376 B
Text

import Lean
set_option linter.suspiciousUnexpanderPatterns true
@[appUnexpander List.nil] def unexpandListNilBad : Lean.PrettyPrinter.Unexpander
| `(List.nil) => `([])
| _ => throw ()
/--hey-/
@[appUnexpander List.cons] private def unexpandListConsBad : Lean.PrettyPrinter.Unexpander
| `(List.cons $x []) => `([$x])
| _ => throw ()