Zulip Chat Archive

Stream: batteries

Topic: Deriving Repr causes unusedArguments to fire


Thomas Murrills (Jan 31 2026 at 06:53):

I noticed in this CI run that deriving Repr causes the unusedArguments linter to spuriously fire; #mwe:

import Batteries

structure Foo where
deriving Repr

/--
error: -- Found 1 error in 5 declarations (plus 10 automatically generated ones) in the current file with 1 linters

/- The `unusedArguments` linter reports:
UNUSED ARGUMENTS. -/
#check instReprFoo.repr /- argument 1 x✝ : Foo, argument 2 prec✝ : Nat -/
-/
#guard_msgs in
#lint only unusedArguments

(Interestingly the lack of module is necessary.)

I feel like I've seen this been reported before, but I can't find any associated threads. :)

Joachim Breitner (Jan 31 2026 at 09:21):

https://github.com/leanprover/lean4/issues/10295


Last updated: Feb 28 2026 at 14:05 UTC