-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a grouped component has an underscore as a placeholder input then double clicking on it does not open the group #10281
Comments
This is a complex issue. If the component has an underscore placeholder, the component doesn't call the method--it just creates a function that will call the method if completed with the missing argument. Currently, we can only enter a called method. We could add support for entering the un-executed definition of a method, though we'd have less information from the backend in that state. |
The specification for underscore arguments is here and as far as I can tell, the current behavior is correct. The following $ cat Main.enso
from Standard.Base import all
foo a = a + 2
main =
node = Main.foo _
node test with:
e.g. there is no invocation. If you want to invoke the function in main =
node = Main.foo
node where there is an attempt to partially invoke function |
For GUI, the only way to handle this would be implementing some sort of name resolution, which is duplicating work the engine is already doing, and still I'm not sure if we get all the needed information. Alternatively, the engine could implement an eta conversion compiler step, to internally convert expressions like
to
or more complex example
becomes
Of course, handling also lambdas ( @AdRiley @JaroslavTulach @jdunkerley so I'm reassigning it to Dmitry to be planned for engine, as the second solution is much better IMO. |
From Discord discussion
So I guess this issue may have low priority |
I'd even claim it is not a bug. Enso is Turing complete language and we cannot statically understand what the code does in 100% of cases. This one is an edge case, where we could improve, but the benefit seems small for now.
Enough to |
The text was updated successfully, but these errors were encountered: