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
It would be great if we could rank/filter tab-completions and suggestions using type information. For example, if someone types 3 cm -> [Tab], we could ideally only show suggestions that would type-check (e.g. matching units).
To implement this, we would essentially have to run the compiler up to the type-checker phase on a substring of the user input (the left-hand-side of the conversion operator in the example above). Because running it on the full input would lead to a parse error.
Another example:
>>> Atan(2,3)
error: while type checking
┌─ <input:4>:1:1
│
1 │ Atan(2,3)
│ ^^^^ unknown callable
│
= Did you mean 'atan'?>>> Atan(2,3)
could be improved by returning atan2 as a suggestion, even if it's further away in terms of edit-distance.
The text was updated successfully, but these errors were encountered:
This might be hard to implement, but …
It would be great if we could rank/filter tab-completions and suggestions using type information. For example, if someone types
3 cm -> [Tab]
, we could ideally only show suggestions that would type-check (e.g. matching units).To implement this, we would essentially have to run the compiler up to the type-checker phase on a substring of the user input (the left-hand-side of the conversion operator in the example above). Because running it on the full input would lead to a parse error.
Another example:
could be improved by returning
atan2
as a suggestion, even if it's further away in terms of edit-distance.The text was updated successfully, but these errors were encountered: