Fix compile errors

This commit is contained in:
Ayaz Hafiz 2022-07-29 12:21:44 -04:00
parent b87f09115c
commit 46b4a97104
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 10 additions and 2 deletions

View file

@ -21,6 +21,7 @@ use roc_parse::pattern::PatternType;
use roc_problem::can::{Problem, RuntimeError, ShadowKind}; use roc_problem::can::{Problem, RuntimeError, ShadowKind};
use roc_region::all::{Loc, Region}; use roc_region::all::{Loc, Region};
use roc_types::subs::{VarStore, Variable}; use roc_types::subs::{VarStore, Variable};
use roc_types::types::AliasKind;
use std::collections::HashMap; use std::collections::HashMap;
use std::fmt::Debug; use std::fmt::Debug;
use ven_graph::{strongly_connected_components, topological_sort_into_groups}; use ven_graph::{strongly_connected_components, topological_sort_into_groups};
@ -341,6 +342,7 @@ fn from_pending_alias<'a>(
typ: symbol, typ: symbol,
variable_region: loc_lowercase.region, variable_region: loc_lowercase.region,
variable_name: loc_lowercase.value.clone(), variable_name: loc_lowercase.value.clone(),
alias_kind: AliasKind::Structural,
}); });
} }
} }
@ -373,7 +375,12 @@ fn from_pending_alias<'a>(
scope.add_alias(env.pool, symbol, named, annotation_id); scope.add_alias(env.pool, symbol, named, annotation_id);
} else { } else {
env.problem(Problem::CyclicAlias(symbol, name.region, vec![])); env.problem(Problem::CyclicAlias(
symbol,
name.region,
vec![],
AliasKind::Structural,
));
return output; return output;
} }
} else { } else {

View file

@ -7,7 +7,7 @@ use roc_error_macros::todo_abilities;
use roc_module::ident::{Ident, Lowercase, TagName, Uppercase}; use roc_module::ident::{Ident, Lowercase, TagName, Uppercase};
use roc_module::symbol::Symbol; use roc_module::symbol::Symbol;
use roc_region::all::{Loc, Region}; use roc_region::all::{Loc, Region};
use roc_types::types::{Problem, RecordField}; use roc_types::types::{AliasKind, Problem, RecordField};
use roc_types::{subs::Variable, types::ErrorType}; use roc_types::{subs::Variable, types::ErrorType};
use crate::lang::env::Env; use crate::lang::env::Env;
@ -793,6 +793,7 @@ fn to_type_apply<'a>(
region, region,
alias_needs: alias.targs.len() as u8, alias_needs: alias.targs.len() as u8,
type_got: args.len() as u8, type_got: args.len() as u8,
alias_kind: AliasKind::Structural,
}); });
return error; return error;
} }