Wiring up dictionary and hash rust code to their zig counterparts

This commit is contained in:
Chadtech 2021-01-18 15:25:37 -05:00
parent c7f6de2afe
commit 520dcfbaca
13 changed files with 79 additions and 10 deletions

View file

@ -906,6 +906,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
// Dict module
// : Attr * (Dict k v) -> Attr * Nat
add_type(Symbol::DICT_SIZE, {
let_tvars! { star1, k , v, star2, int };
unique_function(vec![dict_type(star1, k, v)], int_type(star2, int))
});
// empty : Attr * (Dict k v)
add_type(Symbol::DICT_EMPTY, {
let_tvars! { star, k , v };