mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Capture whole params record when needed
This commit is contained in:
parent
80770fae11
commit
49a6b1bfba
8 changed files with 62 additions and 30 deletions
|
@ -433,18 +433,16 @@ pub fn canonicalize_module_defs<'a>(
|
|||
PermitShadows(false),
|
||||
);
|
||||
|
||||
env.home_param_symbols.reserve(destructs.len());
|
||||
|
||||
for destruct in destructs.iter() {
|
||||
env.home_param_symbols.insert(destruct.value.symbol);
|
||||
}
|
||||
|
||||
let whole_symbol = scope.gen_unique_symbol();
|
||||
env.top_level_symbols.insert(whole_symbol);
|
||||
|
||||
let whole_var = var_store.fresh();
|
||||
|
||||
env.home_params_record = Some((whole_symbol, whole_var));
|
||||
|
||||
ModuleParams {
|
||||
region: pattern.region,
|
||||
whole_var: var_store.fresh(),
|
||||
whole_var,
|
||||
whole_symbol,
|
||||
record_var: var_store.fresh(),
|
||||
record_ext_var: var_store.fresh(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue