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
Original bug ID: 6746 Reporter:@Drup Assigned to:@mshinwell Status: assigned (set by @damiendoligez on 2017-02-24T12:27:41Z) Resolution: open Priority: normal Severity: feature Category: typing
Bug description
There are several generated non-printable names produced by the typechecker. It would be quite useful to avoid them.
I know about:
*opt* for optional arguments (and I think that's all.
*predef* to avoid shadowing. Seems to be used only for optional arguments and only for Some and None now.
It seems to me using x instead of *opt* would work here, including when the name x is repeated (it would work as well for let f ?(x=3) x ...).
If I understood correctly, *opt* is recognized later on for code emission. An attribute, as #default, could be used here.
It's much easier to drop non-printable attributes in the printer than to change the names, especially since the semantic doesn't change (except maybe for effectful code...).
The text was updated successfully, but these errors were encountered:
For what it's worth, I've thought about fixing opt since it causes optional arguments to not have the correct names in gdb. I'm in support of working towards trying to remove at least some of these special names.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 6746
Reporter: @Drup
Assigned to: @mshinwell
Status: assigned (set by @damiendoligez on 2017-02-24T12:27:41Z)
Resolution: open
Priority: normal
Severity: feature
Category: typing
Bug description
There are several generated non-printable names produced by the typechecker. It would be quite useful to avoid them.
I know about:
*opt*
for optional arguments (and I think that's all.*predef*
to avoid shadowing. Seems to be used only for optional arguments and only for Some and None now.*extension*
*sth*
Also related to optional arguments ?*undef*
I don't know the exact use for the last 3.
For 2. I suppose #5849 would do the trick.
For 1. Currently
let f ?y:(x=3) () = x
result in the following equivalent source:It seems to me using
x
instead of*opt*
would work here, including when the name x is repeated (it would work as well forlet f ?(x=3) x ...
).If I understood correctly,
*opt*
is recognized later on for code emission. An attribute, as#default
, could be used here.It's much easier to drop non-printable attributes in the printer than to change the names, especially since the semantic doesn't change (except maybe for effectful code...).
The text was updated successfully, but these errors were encountered: