You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our new textual representation of functions shows its non-default arguments, which is aiding with understanding errors of argument mismatches (e.g. #7359).
After some further practical usage of this new feature, I've noticed that if I set an argument which has a default value, it is not displayed in the function representation.
E.g.
from Standard.Base import all
foo a b c=3 d=4 =
a + b + c + d
main =
IO.println (foo b=100)
IO.println (foo c=200)
After seeing this in practice, I'm sure we want to display the argument when its overridden, regardless if it has a default value or not. Otherwise there is no way to tell if the argument is set or not.
Either way, if the argument has a provided value - then its 'defaulted' status should no longer matter - it should always be displayed (like the c=200 above).
The text was updated successfully, but these errors were encountered:
Our new textual representation of functions shows its non-default arguments, which is aiding with understanding errors of argument mismatches (e.g. #7359).
After some further practical usage of this new feature, I've noticed that if I set an argument which has a default value, it is not displayed in the function representation.
E.g.
Actual behaviour
yields
Expected behaviour
while I'd expect
or even better:
After seeing this in practice, I'm sure we want to display the argument when its overridden, regardless if it has a default value or not. Otherwise there is no way to tell if the argument is set or not.
Additionally, I know I initially voted that there is no need to display defaulted arguments. I'm not yet that sure. I think after all it may be useful to include them in the textual representation, e.g. as shown above as
x=<default>
.Either way, if the argument has a provided value - then its 'defaulted' status should no longer matter - it should always be displayed (like the
c=200
above).The text was updated successfully, but these errors were encountered: