mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Revert "idea (rejected): only generate work up to constraint gen, then look at what modules are actually used and generate Solve.. work based on that"
This reverts commit 2cbe5f5231
.
This commit is contained in:
parent
2cbe5f5231
commit
e914272bf5
5 changed files with 23 additions and 156 deletions
|
@ -32,21 +32,13 @@ impl ExposedByModule {
|
|||
///
|
||||
/// Useful when we know what modules a particular module imports, and want just
|
||||
/// the exposed types for those exposed modules.
|
||||
pub fn retain_modules<'a>(
|
||||
&self,
|
||||
home: ModuleId,
|
||||
it: impl Iterator<Item = &'a ModuleId>,
|
||||
) -> Self {
|
||||
pub fn retain_modules<'a>(&self, it: impl Iterator<Item = &'a ModuleId>) -> Self {
|
||||
let mut output = Self::default();
|
||||
|
||||
for module_id in it {
|
||||
match self.exposed.get(module_id) {
|
||||
None => {
|
||||
internal_error!(
|
||||
"Module {:?} did not register its exposed values for {:?}",
|
||||
module_id,
|
||||
home,
|
||||
)
|
||||
internal_error!("Module {:?} did not register its exposed values", module_id)
|
||||
}
|
||||
Some(exposed_types) => {
|
||||
output.exposed.insert(*module_id, exposed_types.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue