mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
first steps for Dict.keys and Dict.values
This commit is contained in:
parent
927ba11e64
commit
16143bc06e
7 changed files with 122 additions and 1 deletions
|
@ -801,6 +801,24 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// Dict.keys : Dict k v -> List k
|
||||
add_type(
|
||||
Symbol::DICT_KEYS,
|
||||
top_level_function(
|
||||
vec![dict_type(flex(TVAR1), flex(TVAR2))],
|
||||
Box::new(list_type(flex(TVAR1))),
|
||||
),
|
||||
);
|
||||
|
||||
// Dict.values : Dict k v -> List v
|
||||
add_type(
|
||||
Symbol::DICT_KEYS,
|
||||
top_level_function(
|
||||
vec![dict_type(flex(TVAR1), flex(TVAR2))],
|
||||
Box::new(list_type(flex(TVAR2))),
|
||||
),
|
||||
);
|
||||
|
||||
// Set module
|
||||
|
||||
// empty : Set a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue