mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
WIP
This commit is contained in:
parent
646f04ef7b
commit
7d2cc3aac2
10 changed files with 91 additions and 40 deletions
|
@ -747,6 +747,8 @@ fn type_to_variable(
|
|||
};
|
||||
tag_vars.extend(ext_tag_vec.into_iter());
|
||||
|
||||
subs.set_content(*rec_var, Content::RecursionVar(None));
|
||||
|
||||
let content =
|
||||
Content::Structure(FlatType::RecursiveTagUnion(*rec_var, tag_vars, new_ext_var));
|
||||
|
||||
|
@ -1114,7 +1116,7 @@ fn adjust_rank_content(
|
|||
use roc_types::subs::FlatType::*;
|
||||
|
||||
match content {
|
||||
FlexVar(_) | RigidVar(_) | Error => group_rank,
|
||||
FlexVar(_) | RigidVar(_) | RecursionVar(_) | Error => group_rank,
|
||||
|
||||
Structure(flat_type) => {
|
||||
match flat_type {
|
||||
|
@ -1401,7 +1403,7 @@ fn instantiate_rigids_help(
|
|||
copy
|
||||
}
|
||||
|
||||
FlexVar(_) | Error => copy,
|
||||
FlexVar(_) | RecursionVar(_) | Error => copy,
|
||||
|
||||
RigidVar(name) => {
|
||||
subs.set(copy, make_descriptor(FlexVar(Some(name))));
|
||||
|
@ -1576,7 +1578,7 @@ fn deep_copy_var_help(
|
|||
copy
|
||||
}
|
||||
|
||||
FlexVar(_) | Error => copy,
|
||||
FlexVar(_) | RecursionVar(_) | Error => copy,
|
||||
|
||||
RigidVar(name) => {
|
||||
subs.set(copy, make_descriptor(FlexVar(Some(name))));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue