implement isMultipleOf builtin

This commit is contained in:
Eric Henry 2021-03-14 14:52:38 -04:00
parent 618dea11e6
commit 1e9bd0d7f1
7 changed files with 74 additions and 6 deletions

View file

@ -384,6 +384,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// isMultipleOf : Int a, Int a -> Bool
add_type(
Symbol::NUM_IS_MULTIPLE_OF,
top_level_function(
vec![int_type(flex(TVAR1)), int_type(flex(TVAR1))],
Box::new(bool_type()),
),
);
// maxI128 : I128
add_type(Symbol::NUM_MAX_I128, i128_type());