Enumerate severity on problem variants

This commit is contained in:
Ayaz Hafiz 2022-12-02 11:14:17 -06:00
parent 0a4ec1958b
commit e438fbf37c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
9 changed files with 92 additions and 74 deletions

View file

@ -1,6 +1,7 @@
use roc_module::ident::Ident;
use roc_module::ident::{Lowercase, ModuleName, TagName, Uppercase};
use roc_module::symbol::{Interns, ModuleId, PQModuleName, PackageQualified, Symbol};
use roc_problem::Severity;
use roc_region::all::LineColumnRegion;
use std::fmt;
use std::path::{Path, PathBuf};
@ -99,18 +100,6 @@ pub fn pretty_header_with_path(title: &str, path: &Path) -> String {
header
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum Severity {
/// This will cause a runtime error if some code get srun
/// (e.g. type mismatch, naming error)
RuntimeError,
/// This will never cause the code to misbehave,
/// but should be cleaned up
/// (e.g. unused def, unused import)
Warning,
}
#[derive(Clone, Copy, Debug)]
pub enum RenderTarget {
ColorTerminal,