mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Wrap import params expr so we can constrain later
This commit is contained in:
parent
dcb2767b6e
commit
674adf1fad
8 changed files with 68 additions and 14 deletions
|
@ -577,7 +577,7 @@ pub fn constrain_expr(
|
|||
}
|
||||
ParamsVar {
|
||||
symbol,
|
||||
params,
|
||||
params: _,
|
||||
var,
|
||||
} => {
|
||||
// Save the expectation in the variable, then lookup the symbol's type in the environment
|
||||
|
@ -586,11 +586,12 @@ pub fn constrain_expr(
|
|||
|
||||
let lookup_constr = constraints.lookup(*symbol, expected, region);
|
||||
|
||||
// todo(agus): check params
|
||||
// let params_constr = constraints.lookup(*params, expected, region);
|
||||
|
||||
constraints.and_constraint([store_expected, lookup_constr])
|
||||
}
|
||||
ImportParams(params, module_id) => {
|
||||
// todo(agus): constrain
|
||||
Constraint::True
|
||||
}
|
||||
&AbilityMember(symbol, specialization_id, specialization_var) => {
|
||||
// Save the expectation in the `specialization_var` so we know what to specialize, then
|
||||
// lookup the member in the environment.
|
||||
|
@ -4105,6 +4106,7 @@ fn is_generalizable_expr(mut expr: &Expr) -> bool {
|
|||
return true;
|
||||
}
|
||||
OpaqueRef { argument, .. } => expr = &argument.1.value,
|
||||
ImportParams(loc_expr, _) => expr = &loc_expr.value,
|
||||
Str(_)
|
||||
| IngestedFile(..)
|
||||
| List { .. }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue