Correctly monomorphize all derived methods

This commit is contained in:
Ayaz Hafiz 2022-06-22 10:18:41 -04:00
parent d56d880afb
commit 16e64263f6
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
6 changed files with 30 additions and 4 deletions

View file

@ -7,6 +7,7 @@ use bumpalo::Bump;
use roc_can::abilities::AbilitiesStore;
use roc_collections::MutMap;
use roc_derive_key::GlobalDerivedSymbols;
use roc_error_macros::internal_error;
use roc_module::symbol::ModuleId;
use roc_solve::solve::{compact_lambda_sets_of_vars, Phase, Pools};
use roc_types::subs::{Content, FlatType, LambdaSet};
@ -63,7 +64,9 @@ impl WorldAbilities {
F: FnMut(&AbilitiesStore) -> T,
{
let world = self.world.read().unwrap();
let (module_store, _module_types) = world.get(&module).unwrap();
let (module_store, _module_types) = world
.get(&module)
.unwrap_or_else(|| internal_error!("Module {:?} not found in world abilities", module));
f(module_store)
}