mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-17 02:20:16 +00:00
Load and can new top-level imports
Previously, all imports were available in the header, so we could start processing dependencies as soon as we parsed it. However, the new imports are treated as defs, so we have to parse the whole module to find them. This commit essentially moves the dependency resolution from the `LoadHeader` phase to the `Parse` phase, and it updates canonicalization to introduce module symbols into scope when a `ValueDef::ModuleImport` is encountered. NOTE: - The `imports` header still parses, but it's no longer wired up. I will remove it in an upcoming commit. - Ingested files and imports that appear in nested expressions are not yet supported by load
This commit is contained in:
parent
11e0202eb9
commit
710d62f754
43 changed files with 683 additions and 771 deletions
|
@ -251,6 +251,12 @@ fn generate_entry_docs(
|
|||
ValueDef::ExpectFx { .. } => {
|
||||
// Don't generate docs for `expect-fx`s
|
||||
}
|
||||
ValueDef::ModuleImport { .. } => {
|
||||
// Don't generate docs for module imports
|
||||
}
|
||||
ValueDef::IngestedFileImport { .. } => {
|
||||
// Don't generate docs for ingested file imports
|
||||
}
|
||||
},
|
||||
Ok(type_index) => match &defs.type_defs[type_index.index()] {
|
||||
TypeDef::Alias {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue