mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-15 04:10:14 +03:00
glue: find platform main file
This commit is contained in:
parent
738e54ebba
commit
7be590fae9
@ -340,7 +340,6 @@ pub fn load_types(
|
||||
let function_kind = FunctionKind::LambdaSet;
|
||||
let arena = &Bump::new();
|
||||
let LoadedModule {
|
||||
module_id: home,
|
||||
mut can_problems,
|
||||
mut type_problems,
|
||||
mut declarations_by_id,
|
||||
@ -372,6 +371,13 @@ pub fn load_types(
|
||||
}
|
||||
});
|
||||
|
||||
// find the platform's main module
|
||||
let home = declarations_by_id
|
||||
.keys()
|
||||
.find(|id| format!("{id:?}").trim_start_matches("pf.").is_empty())
|
||||
.copied()
|
||||
.unwrap();
|
||||
|
||||
let decls = declarations_by_id.remove(&home).unwrap();
|
||||
let subs = solved.inner_mut();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user