adds Num.subWrap

This commit is contained in:
Celso Bonutti Filho 2020-12-22 22:17:45 -03:00
parent c6b258c50c
commit 176cdd0274
7 changed files with 23 additions and 2 deletions

View file

@ -104,6 +104,12 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// subWrap : Int, Int -> Int
add_type(
Symbol::NUM_SUB_WRAP,
top_level_function(vec![int_type(), int_type()], Box::new(int_type())),
);
// mul or (*) : Num a, Num a -> Num a
add_type(
Symbol::NUM_MUL,