mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
make VariableSubsSlice
This commit is contained in:
parent
c09acb255c
commit
fe773995c8
7 changed files with 83 additions and 34 deletions
|
@ -5,7 +5,8 @@ use roc_module::symbol::Symbol;
|
|||
use roc_region::all::{Located, Region};
|
||||
use roc_types::solved_types::Solved;
|
||||
use roc_types::subs::{
|
||||
Content, Descriptor, FlatType, Mark, OptVariable, Rank, RecordFields, Subs, SubsSlice, Variable,
|
||||
Content, Descriptor, FlatType, Mark, OptVariable, Rank, RecordFields, Subs, Variable,
|
||||
VariableSubsSlice,
|
||||
};
|
||||
use roc_types::types::Type::{self, *};
|
||||
use roc_types::types::{Alias, Category, ErrorType, PatternCategory};
|
||||
|
@ -666,11 +667,7 @@ fn type_to_variable(
|
|||
new_arg_vars.push(var);
|
||||
}
|
||||
|
||||
let start = subs.variables.len() as u32;
|
||||
let length = arg_vars.len() as u16;
|
||||
let arg_vars = SubsSlice::new(start, length);
|
||||
|
||||
subs.variables.extend(new_arg_vars);
|
||||
let arg_vars = VariableSubsSlice::insert_into_subs(subs, new_arg_vars);
|
||||
|
||||
let ret_var = type_to_variable(subs, rank, pools, cached, ret_type);
|
||||
let closure_var = type_to_variable(subs, rank, pools, cached, closure_type);
|
||||
|
@ -1380,11 +1377,7 @@ fn deep_copy_var_help(
|
|||
new_arg_vars.push(copy_var);
|
||||
}
|
||||
|
||||
let start = subs.variables.len() as u32;
|
||||
let length = arg_vars.len() as u16;
|
||||
let arg_vars = SubsSlice::new(start, length);
|
||||
|
||||
subs.variables.extend(new_arg_vars);
|
||||
let arg_vars = VariableSubsSlice::insert_into_subs(subs, new_arg_vars);
|
||||
|
||||
Func(arg_vars, new_closure_var, new_ret_var)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue