mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Always use "MODULE PARAMS" term in errors
The theory is that this will be more searchable
This commit is contained in:
parent
0cbb352a89
commit
26fe91b02f
5 changed files with 23 additions and 44 deletions
|
@ -36,9 +36,9 @@ pub enum TypeError {
|
|||
},
|
||||
IngestedFileBadUtf8(Box<PathBuf>, Utf8Error),
|
||||
IngestedFileUnsupportedType(Box<PathBuf>, ErrorType),
|
||||
UnexpectedImportParams(Region, ModuleId),
|
||||
MissingImportParams(Region, ModuleId, ErrorType),
|
||||
ImportParamsMismatch(Region, ModuleId, ErrorType, ErrorType),
|
||||
UnexpectedModuleParams(Region, ModuleId),
|
||||
MissingModuleParams(Region, ModuleId, ErrorType),
|
||||
ModuleParamsMismatch(Region, ModuleId, ErrorType, ErrorType),
|
||||
}
|
||||
|
||||
impl TypeError {
|
||||
|
@ -58,9 +58,9 @@ impl TypeError {
|
|||
TypeError::Exhaustive(exhtv) => exhtv.severity(),
|
||||
TypeError::StructuralSpecialization { .. } => RuntimeError,
|
||||
TypeError::WrongSpecialization { .. } => RuntimeError,
|
||||
TypeError::UnexpectedImportParams(..) => Warning,
|
||||
TypeError::MissingImportParams(..) => RuntimeError,
|
||||
TypeError::ImportParamsMismatch(..) => RuntimeError,
|
||||
TypeError::UnexpectedModuleParams(..) => Warning,
|
||||
TypeError::MissingModuleParams(..) => RuntimeError,
|
||||
TypeError::ModuleParamsMismatch(..) => RuntimeError,
|
||||
TypeError::IngestedFileBadUtf8(..) => Fatal,
|
||||
TypeError::IngestedFileUnsupportedType(..) => Fatal,
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ impl TypeError {
|
|||
| TypeError::StructuralSpecialization { region, .. }
|
||||
| TypeError::WrongSpecialization { region, .. }
|
||||
| TypeError::BadPatternMissingAbility(region, ..)
|
||||
| TypeError::UnexpectedImportParams(region, ..)
|
||||
| TypeError::MissingImportParams(region, ..)
|
||||
| TypeError::ImportParamsMismatch(region, ..) => Some(*region),
|
||||
| TypeError::UnexpectedModuleParams(region, ..)
|
||||
| TypeError::MissingModuleParams(region, ..)
|
||||
| TypeError::ModuleParamsMismatch(region, ..) => Some(*region),
|
||||
TypeError::UnfulfilledAbility(ab, ..) => ab.region(),
|
||||
TypeError::Exhaustive(e) => Some(e.region()),
|
||||
TypeError::CircularDef(c) => c.first().map(|ce| ce.symbol_region),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue