-
Notifications
You must be signed in to change notification settings - Fork 7
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
[WIP] Row Variables, the hard (but good?) way #903
Conversation
WIP non-compiling
after all, we never have fn foo<T>(x: impl Into<TypeRowBase<T>>) so no need to parameterize over that
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #903 +/- ##
==========================================
- Coverage 85.49% 85.39% -0.11%
==========================================
Files 78 78
Lines 14220 14398 +178
Branches 14220 14398 +178
==========================================
+ Hits 12158 12295 +137
- Misses 1428 1461 +33
- Partials 634 642 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -399,20 +400,38 @@ impl<'a> Substitution<'a> { | |||
arg.clone() | |||
} | |||
|
|||
fn apply_rowvar(&self, idx: usize, _bound: TypeBound) -> Vec<RowVarOrType> { | |||
fn flatten(ta: &TypeArg) -> Vec<RowVarOrType> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to allow instantiating a TypeParam::List with something like [USIZE, var, BOOL] where var is itself a List....I'm not sure all cases here are necessary, and such an instantiation won't actually validate, so more to do here.
I prefer #804 to this. Although I do agree that the approach here is more correct, it complicates the api to no benefit for uses that are "downstream" from any polymorphism. |
Fair. TBH I think the main benefit of this way is that I am a lot more confident that it is (at least mostly) correct!... |
Another option is to parameterise instead by a |
Let's go with #804 |
.into()
or non-workingDefault::default()
might be betterIs it worth it??