mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-23 06:25:10 +00:00
parent
10dd57d45d
commit
2e5fef5231
14 changed files with 289 additions and 46 deletions
|
@ -335,7 +335,11 @@ impl Problem {
|
|||
})
|
||||
| Problem::RuntimeError(RuntimeError::UnsupportedPattern(region))
|
||||
| Problem::RuntimeError(RuntimeError::MalformedPattern(_, region))
|
||||
| Problem::RuntimeError(RuntimeError::LookupNotInScope(Loc { region, .. }, _))
|
||||
| Problem::RuntimeError(RuntimeError::LookupNotInScope {
|
||||
loc_name: Loc { region, .. },
|
||||
suggestion_options: _,
|
||||
underscored_suggestion_region: _,
|
||||
})
|
||||
| Problem::RuntimeError(RuntimeError::OpaqueNotDefined {
|
||||
usage: Loc { region, .. },
|
||||
..
|
||||
|
@ -505,7 +509,14 @@ pub enum RuntimeError {
|
|||
UnresolvedTypeVar,
|
||||
ErroneousType,
|
||||
|
||||
LookupNotInScope(Loc<Ident>, MutSet<Box<str>>),
|
||||
LookupNotInScope {
|
||||
loc_name: Loc<Ident>,
|
||||
/// All of the names in scope (for the error message)
|
||||
suggestion_options: MutSet<Box<str>>,
|
||||
/// If the unfound variable is `name` and there's an ignored variable called `_name`,
|
||||
/// this is the region where `_name` is defined (for the error message)
|
||||
underscored_suggestion_region: Option<Region>,
|
||||
},
|
||||
OpaqueNotDefined {
|
||||
usage: Loc<Ident>,
|
||||
opaques_in_scope: MutSet<Box<str>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue