Revert "Thread through symbols_from_requires"

This reverts commit 1421aebcd3.
This commit is contained in:
Richard Feldman 2022-05-05 16:19:34 -04:00
parent 1421aebcd3
commit 8ac1dfac1a
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
5 changed files with 9 additions and 91 deletions

View file

@ -30,7 +30,7 @@ use roc_mono::ir::{
UpdateModeIds,
};
use roc_mono::layout::{Layout, LayoutCache, LayoutProblem};
use roc_parse::ast::{self, ExtractSpaces, Spaced, StrLiteral, TypeAnnotation};
use roc_parse::ast::{self, ExtractSpaces, Spaced, StrLiteral};
use roc_parse::header::{ExposedName, ImportsEntry, PackageEntry, PlatformHeader, To, TypedIdent};
use roc_parse::header::{HeaderFor, ModuleNameEnum, PackageName};
use roc_parse::ident::UppercaseIdent;
@ -512,9 +512,8 @@ struct ModuleHeader<'a> {
exposes: Vec<Symbol>,
exposed_imports: MutMap<Ident, (Symbol, Region)>,
parse_state: roc_parse::state::State<'a>,
header_for: HeaderFor<'a>,
symbols_from_requires: Vec<(Symbol, Loc<TypeAnnotation<'a>>)>,
module_timing: ModuleTiming,
header_for: HeaderFor<'a>,
}
#[derive(Debug)]
@ -604,7 +603,6 @@ struct ParsedModule<'a> {
exposed_imports: MutMap<Ident, (Symbol, Region)>,
parsed_defs: &'a [Loc<roc_parse::ast::Def<'a>>],
module_name: ModuleNameEnum<'a>,
symbols_from_requires: Vec<(Symbol, Loc<TypeAnnotation<'a>>)>,
header_for: HeaderFor<'a>,
}
@ -3230,9 +3228,8 @@ fn send_header<'a>(
exposes: exposed,
parse_state,
exposed_imports: scope,
symbols_from_requires: Vec::new(),
header_for: extra,
module_timing,
header_for: extra,
}),
)
}
@ -3272,7 +3269,6 @@ fn send_header_two<'a>(
} = info;
let declared_name: ModuleName = "".into();
let mut symbols_from_requires = Vec::with_capacity(requires.len());
let mut imported: Vec<(QualifiedModuleName, Vec<Ident>, Region)> =
Vec::with_capacity(imports.len());
@ -3376,7 +3372,6 @@ fn send_header_two<'a>(
debug_assert!(!scope.contains_key(&ident.clone()));
scope.insert(ident, (symbol, entry.ident.region));
symbols_from_requires.push((symbol, entry.ann));
}
for entry in requires_types {
@ -3476,7 +3471,6 @@ fn send_header_two<'a>(
parse_state,
exposed_imports: scope,
module_timing,
symbols_from_requires,
header_for: extra,
}),
)
@ -3820,7 +3814,6 @@ fn canonicalize_and_constrain<'a>(
exposed_imports,
imported_modules,
mut module_timing,
symbols_from_requires,
..
} = parsed;
@ -3838,7 +3831,6 @@ fn canonicalize_and_constrain<'a>(
aliases,
exposed_imports,
&exposed_symbols,
&symbols_from_requires,
&mut var_store,
);
@ -3883,7 +3875,6 @@ fn canonicalize_and_constrain<'a>(
} else {
constrain_module(
&mut constraints,
module_output.symbols_from_requires,
&module_output.scope.abilities_store,
&module_output.declarations,
module_id,
@ -3995,7 +3986,6 @@ fn parse<'a>(arena: &'a Bump, header: ModuleHeader<'a>) -> Result<Msg<'a>, Loadi
exposed_imports,
module_path,
header_for,
symbols_from_requires,
..
} = header;
@ -4010,7 +4000,6 @@ fn parse<'a>(arena: &'a Bump, header: ModuleHeader<'a>) -> Result<Msg<'a>, Loadi
exposed_ident_ids,
exposed_imports,
parsed_defs,
symbols_from_requires,
header_for,
};