mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +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
|
@ -8,15 +8,13 @@ license.workspace = true
|
|||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
roc_can = { path = "../can" }
|
||||
roc_collections = { path = "../collections" }
|
||||
roc_error_macros = { path = "../../error_macros" }
|
||||
roc_module = { path = "../module" }
|
||||
roc_parse = { path = "../parse" }
|
||||
roc_problem = { path = "../problem" }
|
||||
roc_region = { path = "../region" }
|
||||
roc_types = { path = "../types" }
|
||||
|
||||
roc_can.workspace = true
|
||||
roc_collections.workspace = true
|
||||
roc_error_macros.workspace = true
|
||||
roc_module.workspace = true
|
||||
roc_parse.workspace = true
|
||||
roc_problem.workspace = true
|
||||
roc_region.workspace = true
|
||||
roc_types.workspace = true
|
||||
arrayvec.workspace = true
|
||||
|
||||
soa.workspace = true
|
||||
|
|
|
@ -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