-
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
Autoscoping for Table filter #9277
Comments
The IDE probably need to handle .. prefix for autoscoped constructors as prefix and not operator with missing lhs first to actually test the |
Also, the expression updates for autoscoped constructor calls don't contain the method pointer. The work on the engine side is also needed. |
The issue is that during the instrumentation, the result of the |
I see. We cannot create Method Call object from
However an
|
Dmitry Bushev reports a new STANDUP for yesterday (2024-03-11): Progress: Started working on the task. Investigated how the autoscope constructors with arguments are displayed in the gui. Investigated how the autoscope calls are represented during the instrumentation. It should be finished by 2024-03-13. Next Day: Next day I will be working on the #9277 task. Continue working on the task |
It seems that all the problems with autoscope are from the fact that the resolution is happening in runtime. The type T
A
B
type S
B
foo t:T|S = t
This will require a kind of type inference (i.e. associating types with expressions) which the compiler cannot do right now. But I think it's a good opportunity to start by implementing this very isolated scenario \cc @radeusgd Also, making the name resolution in compile time will not affect the runtime performance. |
The possibility of having autoscoping based on static type inference has been discussed and rejected before the work started. If you believe static type inference is the only way to fix the problems for Let's leave this issue focused on solving the problem, but feel free to question the overall concept. |
Dmitry Bushev reports a new STANDUP for yesterday (2024-03-12): Progress: Continue working on the task. Investigated the issue of why the method calls are not reported for the autoscope constructors. It should be finished by 2024-03-13. Next Day: Next day I will be working on the #9277 task. Continue working on the task |
Should probably be closed once #9259 is closed. |
With commit 3a986f0 from #9452 I was able to get diff --git distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso
index a42bc1dd8c..9aaf724a4f 100644
--- distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso
+++ distribution/lib/Standard/Table/0.0.0-dev/src/Data/Table.enso
@@ -1476,16 +1476,17 @@ type Table
filter self column (filter : Filter_Condition | (Any -> Boolean) = Filter_Condition.Equal True) on_problems=Report_Warning = case column of
_ : Column ->
mask filter_column = Table.Value (self.java_table.filter filter_column.java_column)
- case filter of
+ f = Panic.catch Any (filter:Filter_Condition) _->filter
+ case f of
_ : Filter_Condition ->
- resolved = (self:Table_Ref).resolve_condition filter
+ resolved = (self:Table_Ref).resolve_condition f
mask (make_filter_column column resolved on_problems)
_ : Function -> Filter_Condition_Module.handle_constructor_missing_arguments filter <|
mask (column.map filter)
- _ : Expression -> self.filter (self.evaluate_expression column on_problems) filter on_problems
+ _ : Expression -> @Tail_Call self.filter (self.evaluate_expression column on_problems) filter on_problems
_ ->
table_at = self.at column
- self.filter table_at filter on_problems
+ @Tail_Call self.filter table_at filter on_problems
e.g. the inline type ascription However the IDE seems to know |
Huh, that's an interesting edge case! The Hopefully it will not be needed in too many places - fortunately I don't think there's many other places that mix an autoscoped type with |
#9293 (comment) verifies that after fixing the expression updates for autoscope constructors in #9452, the dropdowns with autoscope constructors work in gui the same way as normal constructors |
The Table filter method uses
make sure the
filter
argument can use autoscoped constructors in the IDE.Tasks
The text was updated successfully, but these errors were encountered: