diff --git a/compiler/unify/src/unify.rs b/compiler/unify/src/unify.rs index fc6c313336..392db8bfb7 100644 --- a/compiler/unify/src/unify.rs +++ b/compiler/unify/src/unify.rs @@ -9,7 +9,7 @@ use roc_types::types::{ErrorType, Mismatch, RecordField}; macro_rules! mismatch { () => {{ - if cfg!(debug_assertions) { + if cfg!(debug_assertions) && std::env::var("ROC_PRINT_MISMATCHES").is_some() { println!( "Mismatch in {} Line {} Column {}", file!(), @@ -21,7 +21,7 @@ macro_rules! mismatch { vec![Mismatch::TypeMismatch] }}; ($msg:expr) => {{ - if cfg!(debug_assertions) { + if cfg!(debug_assertions) && std::env::var("ROC_PRINT_MISMATCHES").is_ok() { println!( "Mismatch in {} Line {} Column {}", file!(), @@ -39,7 +39,7 @@ macro_rules! mismatch { mismatch!($msg) }}; ($msg:expr, $($arg:tt)*) => {{ - if cfg!(debug_assertions) { + if cfg!(debug_assertions) && std::env::var("ROC_PRINT_MISMATCHES").is_ok() { println!( "Mismatch in {} Line {} Column {}", file!(), diff --git a/repl_eval/src/eval.rs b/repl_eval/src/eval.rs index 0b946a73a1..4cb651bdda 100644 --- a/repl_eval/src/eval.rs +++ b/repl_eval/src/eval.rs @@ -1166,6 +1166,9 @@ fn num_to_ast<'a, A: ReplApp>( num_to_ast(env, num_expr, content) } + RangedNumber(typ, _) => { + num_to_ast(env, num_expr, env.subs.get_content_without_compacting(*typ)) + } other => { panic!("Unexpected FlatType {:?} in num_to_ast", other); }