This commit is contained in:
Ayaz Hafiz 2022-04-28 15:47:19 -04:00 committed by ayazhafiz
parent 5f8834d6b4
commit afe49cf570
3 changed files with 5 additions and 22 deletions

View file

@ -83,15 +83,12 @@ fn create_llvm_module<'a>(
let mut delayed_errors = Vec::new();
for (home, (module_path, src)) in loaded.sources {
use roc_reporting::report::{
can_problem, mono_problem, type_problem, RocDocAllocator, DEFAULT_PALETTE,
};
use roc_reporting::report::{can_problem, type_problem, RocDocAllocator, DEFAULT_PALETTE};
let can_problems = loaded.can_problems.remove(&home).unwrap_or_default();
let type_problems = loaded.type_problems.remove(&home).unwrap_or_default();
let mono_problems = loaded.mono_problems.remove(&home).unwrap_or_default();
let error_count = can_problems.len() + type_problems.len() + mono_problems.len();
let error_count = can_problems.len() + type_problems.len();
if error_count == 0 {
continue;
@ -144,16 +141,6 @@ fn create_llvm_module<'a>(
lines.push(buf);
}
}
for problem in mono_problems {
let report = mono_problem(&alloc, &line_info, module_path.clone(), problem);
let mut buf = String::new();
report.render_color_terminal(&mut buf, &alloc, &palette);
delayed_errors.push(buf.clone());
lines.push(buf);
}
}
if !lines.is_empty() {