mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
basic versions of contains and remove
This commit is contained in:
parent
b4ab02f23a
commit
afe2f51660
13 changed files with 402 additions and 23 deletions
|
@ -770,6 +770,7 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// Dict.insert : Dict k v, k, v -> Dict k v
|
||||
add_type(
|
||||
Symbol::DICT_INSERT,
|
||||
top_level_function(
|
||||
|
@ -782,6 +783,24 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// Dict.remove : Dict k v, k -> Dict k v
|
||||
add_type(
|
||||
Symbol::DICT_REMOVE,
|
||||
top_level_function(
|
||||
vec![dict_type(flex(TVAR1), flex(TVAR2)), flex(TVAR1)],
|
||||
Box::new(dict_type(flex(TVAR1), flex(TVAR2))),
|
||||
),
|
||||
);
|
||||
|
||||
// Dict.contains : Dict k v, k -> Bool
|
||||
add_type(
|
||||
Symbol::DICT_CONTAINS,
|
||||
top_level_function(
|
||||
vec![dict_type(flex(TVAR1), flex(TVAR2)), flex(TVAR1)],
|
||||
Box::new(bool_type()),
|
||||
),
|
||||
);
|
||||
|
||||
// Set module
|
||||
|
||||
// empty : Set a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue