mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 17:17:26 +00:00
Merge attempt
This commit is contained in:
parent
7c15c16ae0
commit
12df3a04de
236 changed files with 9053 additions and 6428 deletions
|
@ -4,7 +4,7 @@ use std::path::PathBuf;
|
|||
use roc_collections::all::MutSet;
|
||||
use roc_module::called_via::BinOp;
|
||||
use roc_module::ident::{Ident, Lowercase, ModuleName, TagName};
|
||||
use roc_module::symbol::{ModuleId, ScopeModuleSource, Symbol};
|
||||
use roc_module::symbol::{ModuleId, Symbol};
|
||||
use roc_parse::ast::Base;
|
||||
use roc_parse::pattern::PatternType;
|
||||
use roc_region::all::{Loc, Region};
|
||||
|
@ -53,6 +53,7 @@ pub enum Problem {
|
|||
new_symbol: Symbol,
|
||||
existing_symbol_region: Region,
|
||||
},
|
||||
DeprecatedBackpassing(Region),
|
||||
/// First symbol is the name of the closure with that argument
|
||||
/// Bool is whether the closure is anonymous
|
||||
/// Second symbol is the name of the argument that is unused
|
||||
|
@ -237,6 +238,13 @@ pub enum Problem {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum ScopeModuleSource {
|
||||
Builtin,
|
||||
Current,
|
||||
Import(Region),
|
||||
}
|
||||
|
||||
impl Problem {
|
||||
pub fn severity(&self) -> Severity {
|
||||
use Severity::{Fatal, RuntimeError, Warning};
|
||||
|
@ -249,6 +257,7 @@ impl Problem {
|
|||
Problem::ExplicitBuiltinImport(_, _) => Warning,
|
||||
Problem::ExplicitBuiltinTypeImport(_, _) => Warning,
|
||||
Problem::ImportShadowsSymbol { .. } => RuntimeError,
|
||||
Problem::DeprecatedBackpassing(_) => Warning,
|
||||
Problem::ExposedButNotDefined(_) => RuntimeError,
|
||||
Problem::UnusedArgument(_, _, _, _) => Warning,
|
||||
Problem::UnusedBranchDef(_, _) => Warning,
|
||||
|
@ -331,6 +340,7 @@ impl Problem {
|
|||
| Problem::ExplicitBuiltinImport(_, region)
|
||||
| Problem::ExplicitBuiltinTypeImport(_, region)
|
||||
| Problem::ImportShadowsSymbol { region, .. }
|
||||
| Problem::DeprecatedBackpassing(region)
|
||||
| Problem::UnusedArgument(_, _, _, region)
|
||||
| Problem::UnusedBranchDef(_, region)
|
||||
| Problem::PrecedenceProblem(PrecedenceProblem::BothNonAssociative(region, _, _))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue