Remove INT_DIV from std.rs

This commit is contained in:
Chad Stearns 2020-04-29 18:22:25 -04:00
parent 516f5736c2
commit 0518ccc991

View File

@ -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,