mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
New data structure for storing sorted abilities bound to a variable
This commit is contained in:
parent
229548571b
commit
1e6181d2cb
7 changed files with 66 additions and 29 deletions
|
@ -71,8 +71,7 @@ pub fn run_solve(
|
|||
}
|
||||
|
||||
for (var, (name, abilities)) in rigid_variables.able {
|
||||
// TODO(abilities)
|
||||
subs.rigid_able_var(var, name, abilities[0]);
|
||||
subs.rigid_able_var(var, name, abilities);
|
||||
}
|
||||
|
||||
for var in rigid_variables.wildcards {
|
||||
|
|
|
@ -2609,7 +2609,7 @@ fn type_to_variable<'a>(
|
|||
match *subs.get_content_without_compacting(var) {
|
||||
FlexVar(opt_name) => {
|
||||
// TODO(multi-abilities): check run cache
|
||||
let abilities_slice = SubsSlice::extend_new(&mut subs.symbol_names, abilities.iter().copied());
|
||||
let abilities_slice = SubsSlice::extend_new(&mut subs.symbol_names, abilities.sorted_iter().copied());
|
||||
subs.set_content(var, FlexAbleVar(opt_name, abilities_slice))
|
||||
},
|
||||
RigidVar(..) => internal_error!("Rigid var in type arg for {:?} - this is a bug in the solver, or our understanding", actual),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue