Plain number literals (e.g. 5) are now Num *

This commit is contained in:
Richard Feldman 2020-03-10 20:40:53 -04:00
parent 9081b7f2d1
commit 3ecbe0325c
21 changed files with 345 additions and 223 deletions

View file

@ -154,6 +154,10 @@ fn constrain_pattern(
);
}
NumLiteral(_, _) => {
panic!("TODO uniq constraint for NumLiteral");
}
IntLiteral(_) => {
let (num_uvar, int_uvar, num_type) = unique_int(var_store);
state.constraints.push(exists(
@ -339,6 +343,9 @@ pub fn constrain_expr(
pub use roc_can::expr::Expr::*;
match expr {
Num(_var, _) => {
panic!("TODO uniq::constrain_expr for Num literal");
}
Int(var, _) => {
let (num_uvar, int_uvar, num_type) = unique_int(var_store);