more types!

This commit is contained in:
Folkert 2022-04-26 20:10:29 +02:00
parent d3ef35d935
commit c31b796938
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
10 changed files with 116 additions and 71 deletions

View file

@ -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());
}
}

View file

@ -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> {

View file

@ -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>,