mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Handle builtin defs in canonicalize_module_defs
This commit is contained in:
parent
468deebaa3
commit
6b183b1bcc
2 changed files with 13 additions and 12 deletions
|
@ -1,3 +1,4 @@
|
|||
use crate::builtins;
|
||||
use crate::def::{canonicalize_defs, sort_can_defs, Declaration};
|
||||
use crate::env::Env;
|
||||
use crate::expr::Output;
|
||||
|
@ -259,6 +260,15 @@ pub fn canonicalize_module_defs<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
// Add builtin defs (e.g. List.get) to the module's defs
|
||||
let builtin_defs = builtins::builtin_defs(var_store);
|
||||
|
||||
for (symbol, def) in builtin_defs {
|
||||
if references.contains(&symbol) {
|
||||
declarations.push(Declaration::Builtin(def));
|
||||
}
|
||||
}
|
||||
|
||||
Ok(ModuleOutput {
|
||||
aliases,
|
||||
rigid_variables,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue