add bitwise xor

This commit is contained in:
Sébastien Besnier 2021-01-14 16:12:46 +01:00
parent c4e5af554b
commit fdc2b6ad86
9 changed files with 59 additions and 14 deletions

View file

@ -291,6 +291,15 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
),
);
// bitwiseXor : Int a, Int a -> Int a
add_type(
Symbol::NUM_BITWISE_XOR,
top_level_function(
vec![int_type(flex(TVAR1)), int_type(flex(TVAR1))],
Box::new(int_type(flex(TVAR1))),
),
);
// rem : Int a, Int a -> Result (Int a) [ DivByZero ]*
add_type(
Symbol::NUM_REM,