mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
make builtin applies importable
This commit is contained in:
parent
9c5df1d5a5
commit
63c5af2882
3 changed files with 35 additions and 19 deletions
|
@ -1,4 +1,4 @@
|
|||
use roc_collections::all::{default_hasher, MutMap};
|
||||
use roc_collections::all::{default_hasher, MutMap, MutSet};
|
||||
use roc_module::ident::TagName;
|
||||
use roc_module::symbol::Symbol;
|
||||
use roc_region::all::{Located, Region};
|
||||
|
@ -16,6 +16,7 @@ pub struct StdLib {
|
|||
pub mode: Mode,
|
||||
pub types: MutMap<Symbol, (SolvedType, Region)>,
|
||||
pub aliases: MutMap<Symbol, BuiltinAlias>,
|
||||
pub applies: MutSet<Symbol>,
|
||||
}
|
||||
|
||||
pub fn standard_stdlib() -> StdLib {
|
||||
|
@ -23,6 +24,14 @@ pub fn standard_stdlib() -> StdLib {
|
|||
mode: Mode::Standard,
|
||||
types: types(),
|
||||
aliases: aliases(),
|
||||
applies: vec![
|
||||
Symbol::LIST_LIST,
|
||||
Symbol::SET_SET,
|
||||
Symbol::MAP_MAP,
|
||||
Symbol::STR_STR,
|
||||
]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue