mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
HUGE WIP
This commit is contained in:
parent
1921b74ebb
commit
ef1cee6c41
6 changed files with 354 additions and 123 deletions
|
@ -876,6 +876,13 @@ pub enum UnionVariant<'a> {
|
|||
}
|
||||
|
||||
pub fn union_sorted_tags<'a>(arena: &'a Bump, var: Variable, subs: &Subs) -> UnionVariant<'a> {
|
||||
let var =
|
||||
if let Content::RecursionVar { structure, .. } = subs.get_without_compacting(var).content {
|
||||
structure
|
||||
} else {
|
||||
var
|
||||
};
|
||||
|
||||
let mut tags_vec = std::vec::Vec::new();
|
||||
let result = match roc_types::pretty_print::chase_ext_tag_union(subs, var, &mut tags_vec) {
|
||||
Ok(()) | Err((_, Content::FlexVar(_))) | Err((_, Content::RecursionVar { .. })) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue