mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
more types!
This commit is contained in:
parent
d3ef35d935
commit
c31b796938
10 changed files with 116 additions and 71 deletions
|
@ -984,7 +984,7 @@ fn add_annotation_aliases(
|
|||
aliases: &mut VecMap<Symbol, Alias>,
|
||||
) {
|
||||
for (name, alias) in type_annotation.aliases.iter() {
|
||||
if !aliases.contains(name) {
|
||||
if !aliases.contains_key(name) {
|
||||
aliases.insert(*name, alias.clone());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::procedure::References;
|
||||
use roc_collections::{MutMap, VecSet};
|
||||
use roc_module::ident::{Ident, Lowercase, ModuleName};
|
||||
use roc_module::symbol::{IdentIds, ModuleId, ModuleIds, Symbol};
|
||||
use roc_module::symbol::{IdentIds, IdentIdsByModule, ModuleId, ModuleIds, Symbol};
|
||||
use roc_problem::can::{Problem, RuntimeError};
|
||||
use roc_region::all::{Loc, Region};
|
||||
|
||||
|
@ -11,7 +11,7 @@ pub struct Env<'a> {
|
|||
/// are assumed to be relative to this path.
|
||||
pub home: ModuleId,
|
||||
|
||||
pub dep_idents: &'a MutMap<ModuleId, IdentIds>,
|
||||
pub dep_idents: &'a IdentIdsByModule,
|
||||
|
||||
pub module_ids: &'a ModuleIds,
|
||||
|
||||
|
@ -42,7 +42,7 @@ pub struct Env<'a> {
|
|||
impl<'a> Env<'a> {
|
||||
pub fn new(
|
||||
home: ModuleId,
|
||||
dep_idents: &'a MutMap<ModuleId, IdentIds>,
|
||||
dep_idents: &'a IdentIdsByModule,
|
||||
module_ids: &'a ModuleIds,
|
||||
exposed_ident_ids: IdentIds,
|
||||
) -> Env<'a> {
|
||||
|
|
|
@ -10,7 +10,7 @@ use bumpalo::Bump;
|
|||
use roc_collections::{MutMap, SendMap, VecSet};
|
||||
use roc_module::ident::Ident;
|
||||
use roc_module::ident::Lowercase;
|
||||
use roc_module::symbol::{IdentIds, ModuleId, ModuleIds, Symbol};
|
||||
use roc_module::symbol::{IdentIds, IdentIdsByModule, ModuleId, ModuleIds, Symbol};
|
||||
use roc_parse::ast;
|
||||
use roc_parse::header::HeaderFor;
|
||||
use roc_parse::pattern::PatternType;
|
||||
|
@ -170,7 +170,7 @@ pub fn canonicalize_module_defs<'a>(
|
|||
home: ModuleId,
|
||||
module_ids: &ModuleIds,
|
||||
exposed_ident_ids: IdentIds,
|
||||
dep_idents: &'a MutMap<ModuleId, IdentIds>,
|
||||
dep_idents: &'a IdentIdsByModule,
|
||||
aliases: MutMap<Symbol, Alias>,
|
||||
exposed_imports: MutMap<Ident, (Symbol, Region)>,
|
||||
exposed_symbols: &VecSet<Symbol>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue