Move Int and Float modules into Num

This commit is contained in:
Richard Feldman 2020-06-22 21:58:42 -04:00
parent d041355c1d
commit 88990c8711
26 changed files with 543 additions and 547 deletions

View file

@ -308,7 +308,7 @@ enum IntOrFloat {
/// Given the `a` in `Num a`, determines whether it's an int or a float
fn num_argument_to_int_or_float(subs: &Subs, var: Variable) -> IntOrFloat {
match subs.get_without_compacting(var).content {
Content::Alias(Symbol::INT_INTEGER, args, _) => {
Content::Alias(Symbol::NUM_INTEGER, args, _) => {
debug_assert!(args.is_empty());
IntOrFloat::IntType
}
@ -316,7 +316,7 @@ fn num_argument_to_int_or_float(subs: &Subs, var: Variable) -> IntOrFloat {
// If this was still a (Num *), assume compiling it to an Int
IntOrFloat::IntType
}
Content::Alias(Symbol::FLOAT_FLOATINGPOINT, args, _) => {
Content::Alias(Symbol::NUM_FLOATINGPOINT, args, _) => {
debug_assert!(args.is_empty());
IntOrFloat::FloatType
}