mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Remove INT_DIV from std.rs
This commit is contained in:
parent
516f5736c2
commit
0518ccc991
1 changed files with 4 additions and 13 deletions
|
@ -286,25 +286,16 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
// lowest : Int
|
||||
add_type(Symbol::INT_LOWEST, int_type());
|
||||
|
||||
let div_by_zero = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("DivByZero".into()), vec![])],
|
||||
Box::new(SolvedType::Wildcard),
|
||||
);
|
||||
// div : Int, Int -> Result Int [ DivByZero ]*
|
||||
add_type(
|
||||
Symbol::INT_DIV,
|
||||
SolvedType::Func(
|
||||
vec![int_type(), int_type()],
|
||||
Box::new(result_type(flex(TVAR1), div_by_zero.clone())),
|
||||
),
|
||||
);
|
||||
|
||||
// div : Int, Int -> Int
|
||||
add_type(
|
||||
Symbol::INT_DIV_UNSAFE,
|
||||
SolvedType::Func(vec![int_type(), int_type()], Box::new(int_type())),
|
||||
);
|
||||
|
||||
let div_by_zero = SolvedType::TagUnion(
|
||||
vec![(TagName::Global("DivByZero".into()), vec![])],
|
||||
Box::new(SolvedType::Wildcard),
|
||||
);
|
||||
// mod : Int, Int -> Result Int [ DivByZero ]*
|
||||
add_type(
|
||||
Symbol::INT_MOD,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue