mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
import Box by default
This commit is contained in:
parent
aa8eed2fc9
commit
1c8b18f176
2 changed files with 14 additions and 0 deletions
|
@ -143,6 +143,11 @@ impl Default for ModuleCache<'_> {
|
|||
PQModuleName::Unqualified(ModuleName::from(ModuleName::NUM)),
|
||||
);
|
||||
|
||||
module_names.insert(
|
||||
ModuleId::BOX,
|
||||
PQModuleName::Unqualified(ModuleName::from(ModuleName::BOX)),
|
||||
);
|
||||
|
||||
Self {
|
||||
module_names,
|
||||
headers: Default::default(),
|
||||
|
@ -1853,6 +1858,14 @@ fn update<'a>(
|
|||
}
|
||||
|
||||
if !header.module_id.is_builtin() {
|
||||
header
|
||||
.package_qualified_imported_modules
|
||||
.insert(PackageQualified::Unqualified(ModuleId::BOX));
|
||||
|
||||
header
|
||||
.imported_modules
|
||||
.insert(ModuleId::BOX, Region::zero());
|
||||
|
||||
header
|
||||
.package_qualified_imported_modules
|
||||
.insert(PackageQualified::Unqualified(ModuleId::STR));
|
||||
|
|
|
@ -90,6 +90,7 @@ impl ModuleName {
|
|||
pub const DICT: &'static str = "Dict";
|
||||
pub const SET: &'static str = "Set";
|
||||
pub const RESULT: &'static str = "Result";
|
||||
pub const BOX: &'static str = "Box";
|
||||
|
||||
pub fn as_str(&self) -> &str {
|
||||
self.0.as_str()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue