mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Merge branch 'main' into allow-try-in-statements
This commit is contained in:
commit
29c8759bc0
320 changed files with 6977 additions and 2011 deletions
|
@ -64,6 +64,15 @@ pub struct Env {
|
|||
}
|
||||
|
||||
impl Env {
|
||||
pub fn new(home: ModuleId) -> Self {
|
||||
Self {
|
||||
rigids: MutMap::default(),
|
||||
resolutions_to_make: Vec::new(),
|
||||
home,
|
||||
fx_expectation: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_fx_expectation<F, T>(
|
||||
&mut self,
|
||||
fx_var: Variable,
|
||||
|
@ -1806,15 +1815,6 @@ pub fn constrain_expr(
|
|||
arg_cons.push(eq);
|
||||
constraints.exists_many(vars, arg_cons)
|
||||
}
|
||||
TypedHole(var) => {
|
||||
// store the expected type for this position
|
||||
constraints.equal_types_var(
|
||||
*var,
|
||||
expected,
|
||||
Category::Storage(std::file!(), std::line!()),
|
||||
region,
|
||||
)
|
||||
}
|
||||
RuntimeError(_) => {
|
||||
// Runtime Errors are always going to crash, so they don't introduce any new
|
||||
// constraints.
|
||||
|
@ -4405,7 +4405,6 @@ fn is_generalizable_expr(mut expr: &Expr) -> bool {
|
|||
| Expect { .. }
|
||||
| Dbg { .. }
|
||||
| Return { .. }
|
||||
| TypedHole(_)
|
||||
| RuntimeError(..)
|
||||
| ZeroArgumentTag { .. }
|
||||
| Tag { .. }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue