mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
one more shrinkage
This commit is contained in:
parent
892447b08c
commit
54198d7da1
8 changed files with 18 additions and 16 deletions
|
@ -494,8 +494,8 @@ fn write_flat_type(env: &Env, flat_type: &FlatType, subs: &Subs, buf: &mut Strin
|
|||
FunctionOrTagUnion(tag_name, _, ext_var) => {
|
||||
buf.push_str("[ ");
|
||||
|
||||
let mut tags = MutMap::default();
|
||||
tags.insert(tag_name.clone(), vec![]);
|
||||
let mut tags: MutMap<TagName, _> = MutMap::default();
|
||||
tags.insert(*tag_name.clone(), vec![]);
|
||||
let ext_content = write_sorted_tags(env, subs, buf, &tags, *ext_var);
|
||||
|
||||
buf.push_str(" ]");
|
||||
|
@ -558,7 +558,7 @@ pub fn chase_ext_tag_union<'a>(
|
|||
chase_ext_tag_union(subs, *ext_var, fields)
|
||||
}
|
||||
Content::Structure(FunctionOrTagUnion(tag_name, _, ext_var)) => {
|
||||
fields.push((tag_name.clone(), vec![]));
|
||||
fields.push((*tag_name.clone(), vec![]));
|
||||
|
||||
chase_ext_tag_union(subs, *ext_var, fields)
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ impl SolvedType {
|
|||
FunctionOrTagUnion(tag_name, symbol, ext_var) => {
|
||||
let ext = Self::from_var_help(subs, recursion_vars, *ext_var);
|
||||
|
||||
SolvedType::FunctionOrTagUnion(tag_name.clone(), *symbol, Box::new(ext))
|
||||
SolvedType::FunctionOrTagUnion(*tag_name.clone(), *symbol, Box::new(ext))
|
||||
}
|
||||
RecursiveTagUnion(rec_var, tags, ext_var) => {
|
||||
recursion_vars.insert(subs, *rec_var);
|
||||
|
|
|
@ -626,7 +626,7 @@ pub enum FlatType {
|
|||
Func(Vec<Variable>, Variable, Variable),
|
||||
Record(RecordFields, Variable),
|
||||
TagUnion(MutMap<TagName, Vec<Variable>>, Variable),
|
||||
FunctionOrTagUnion(TagName, Symbol, Variable),
|
||||
FunctionOrTagUnion(Box<TagName>, Symbol, Variable),
|
||||
RecursiveTagUnion(Variable, MutMap<TagName, Vec<Variable>>, Variable),
|
||||
Erroneous(Box<Problem>),
|
||||
EmptyRecord,
|
||||
|
@ -1389,6 +1389,8 @@ fn flat_type_to_err_type(
|
|||
}
|
||||
|
||||
FunctionOrTagUnion(tag_name, _, ext_var) => {
|
||||
let tag_name = *tag_name;
|
||||
|
||||
let mut err_tags = SendMap::default();
|
||||
|
||||
err_tags.insert(tag_name, vec![]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue