mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
add Num.bitwiseOr and Num.shiftLeftBy
This commit is contained in:
parent
89bf22598e
commit
ea76578e06
6 changed files with 83 additions and 11 deletions
|
@ -324,6 +324,24 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
),
|
||||
);
|
||||
|
||||
// bitwiseOr : Int a, Int a -> Int a
|
||||
add_type(
|
||||
Symbol::NUM_BITWISE_OR,
|
||||
top_level_function(
|
||||
vec![int_type(flex(TVAR1)), int_type(flex(TVAR1))],
|
||||
Box::new(int_type(flex(TVAR1))),
|
||||
),
|
||||
);
|
||||
|
||||
// shiftLeftBy : Nat, Int a -> Int a
|
||||
add_type(
|
||||
Symbol::NUM_SHIFT_LEFT,
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue