Render List.append as @ and keep functions fully qualified in goal state - #87
Render List.append as @ and keep functions fully qualified in goal state#87grantpassmore wants to merge 1 commit into
Conversation
The goal-state term formatter mapped List.append to @ and computed the proper operator name, but a subsequent module-stripping step overwrote it, turning @ back into infix append and shortening List.length to length. Drop the module-stripping so operator aliases (@, <==>, ==>) survive and ordinary functions stay fully qualified (List.length). The full id remains available in the hover.
| // Map operator names to their visual form if different, e.g. `iff` vs `<==>` | ||
| // Map operator names to their visual form if different, e.g. `iff` vs | ||
| // `<==>`, or `List.append` vs `@`. Names that don't have a special visual | ||
| // form are kept fully qualified (e.g. `List.length`). |
There was a problem hiding this comment.
I absolutely have to keep module name stripping, because otherwise my entire screen is filled with module names and I can't see what the code means. The fully qualified name is always in the hover if you need to see it.
|
After losing a bunch of sleep over this last night, I am now surer than ever that my gut feeling was right all along: this is not a "UI" issue at all, but an operator design issue, and this is the wrong place to fix it. Here's my reasoning: If we like the (Also, less important, but in a user-defined (Some time in the not too distant future, I'll add a |
|
(Implemented as discussed via #85) |
The goal-state term formatter mapped List.append to @ and computed the proper operator name, but a subsequent module-stripping step overwrote it, turning @ back into infix append and shortening List.length to length.
Drop the module-stripping so operator aliases (@, <==>, ==>) survive and ordinary functions stay fully qualified (List.length). The full id remains available in the hover.
i.e., PR for going from this:
to this: