make builtin applies importable

This commit is contained in:
Folkert 2020-03-07 01:21:45 +01:00
parent 9c5df1d5a5
commit 63c5af2882
3 changed files with 35 additions and 19 deletions

View file

@ -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(),
}
}