Zulip Chat Archive

Stream: lean4

Topic: Error message in class argument


Patrick Massot (Oct 16 2022 at 19:50):

I think that auto-implicit arguments make it hard to understand what happens when you make a typo in a type class argument.

example {α : Type} [foo α] : true :=
 rfl

gives error

invalid binder annotation, type is not a class instance
  ?m.10
use the command `set_option checkBinderAnnotations false` to disable the check

which becomes a much clearer unknown identifier 'foo' when disabling autoImplicit.

Scott Morrison (Oct 16 2022 at 22:15):

I regularly find this one unhelpful, too.


Last updated: Dec 20 2023 at 11:08 UTC