Incorrect error message on external
arity mismatch with local substitution
#10427
Labels
external
arity mismatch with local substitution
#10427
I ran into the following example today:
This is rightly rejected because the two
external
s have differing arities. (It also happens that the implementation expects the wrong arity of%identity
, but this won't be determined until after type checking.)However, the reason that OCaml gives for rejecting it is not correct:
The compiler is making a distinction between two different classes of arrows that isn't conveyed to the user. It seems better for the compiler to state that the arities of the two types differ, and perhaps even refer to the corresponding section of the manual since this notion of arity can be surprising for users (e.g. here).
The text was updated successfully, but these errors were encountered: