lean4-htt/tests/lean/linterSuspiciousUnexpanderPatterns.lean
2022-10-19 09:28:08 -07:00

12 lines
378 B
Text

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