mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 16:51:53 +03:00
Remove INT_DIV from std.rs
This commit is contained in:
parent
516f5736c2
commit
0518ccc991
@ -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…
Reference in New Issue
Block a user