Constrain + solve crash

This commit is contained in:
Ayaz Hafiz 2022-11-02 16:05:13 -05:00
parent 9dc489c2b0
commit e2b30e5301
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
13 changed files with 194 additions and 60 deletions

View file

@ -195,6 +195,12 @@ pub enum Problem {
type_got: u8,
alias_kind: AliasKind,
},
UnappliedCrash {
region: Region,
},
OverAppliedCrash {
region: Region,
},
}
impl Problem {
@ -325,7 +331,9 @@ impl Problem {
}
| Problem::MultipleListRestPattern { region }
| Problem::BadTypeArguments { region, .. }
| Problem::UnnecessaryOutputWildcard { region } => Some(*region),
| Problem::UnnecessaryOutputWildcard { region }
| Problem::OverAppliedCrash { region }
| Problem::UnappliedCrash { region } => Some(*region),
Problem::RuntimeError(RuntimeError::CircularDef(cycle_entries))
| Problem::BadRecursion(cycle_entries) => {
cycle_entries.first().map(|entry| entry.expr_region)