mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Canonicalize and constrain statement expr in purity inference mode
This commit is contained in:
parent
460fa693fd
commit
6e6382ab23
14 changed files with 197 additions and 61 deletions
|
@ -1,7 +1,7 @@
|
|||
use crate::abilities::SpecializationId;
|
||||
use crate::annotation::{freshen_opaque_def, IntroducedVariables};
|
||||
use crate::builtins::builtin_defs_map;
|
||||
use crate::def::{can_defs_with_return, Annotation, Def};
|
||||
use crate::def::{can_defs_with_return, Annotation, Def, DefKind};
|
||||
use crate::env::Env;
|
||||
use crate::num::{
|
||||
finish_parsing_base, finish_parsing_float, finish_parsing_num, float_expr_from_result,
|
||||
|
@ -2288,6 +2288,7 @@ pub fn inline_calls(var_store: &mut VarStore, expr: Expr) -> Expr {
|
|||
expr_var: def.expr_var,
|
||||
pattern_vars: def.pattern_vars,
|
||||
annotation: def.annotation,
|
||||
kind: def.kind,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2309,6 +2310,7 @@ pub fn inline_calls(var_store: &mut VarStore, expr: Expr) -> Expr {
|
|||
expr_var: def.expr_var,
|
||||
pattern_vars: def.pattern_vars,
|
||||
annotation: def.annotation,
|
||||
kind: def.kind,
|
||||
};
|
||||
|
||||
let loc_expr = Loc {
|
||||
|
@ -2498,6 +2500,7 @@ pub fn inline_calls(var_store: &mut VarStore, expr: Expr) -> Expr {
|
|||
expr_var,
|
||||
pattern_vars,
|
||||
annotation: None,
|
||||
kind: DefKind::Let,
|
||||
};
|
||||
|
||||
loc_answer = Loc {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue