mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
all the work
This commit is contained in:
parent
1cee8f77b9
commit
69c224843e
10 changed files with 582 additions and 366 deletions
|
@ -1209,12 +1209,8 @@ fn layout_from_flat_type<'a>(
|
|||
}
|
||||
Record(fields, ext_var) => {
|
||||
// extract any values from the ext_var
|
||||
let mut fields_map = MutMap::default();
|
||||
fields_map.extend(fields);
|
||||
match roc_types::pretty_print::chase_ext_record(subs, ext_var, &mut fields_map) {
|
||||
Ok(()) | Err((_, Content::FlexVar(_))) => {}
|
||||
Err(_) => unreachable!("this would have been a type error"),
|
||||
}
|
||||
// TODO short-circuit the sorting here
|
||||
let mut fields_map: MutMap<_, _> = fields.sorted_iterator(subs, ext_var).collect();
|
||||
|
||||
// discard optional fields
|
||||
let mut layouts = sort_stored_record_fields(env, fields_map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue