mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-26 16:03:44 +00:00
Treat untyped suffixed functions as effectful
This commit is contained in:
parent
af6fc6306f
commit
cfc4be5254
25 changed files with 139 additions and 21 deletions
|
@ -1660,7 +1660,8 @@ fn solve_suffix_fx(
|
|||
}
|
||||
}
|
||||
Content::FlexVar(_) => {
|
||||
// [purity-inference] TODO: Require effectful fn
|
||||
env.subs
|
||||
.set_content(variable, Content::Structure(FlatType::EffectfulFunc));
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
|
@ -2379,6 +2380,8 @@ fn adjust_rank_content(
|
|||
// THEORY: an empty tag never needs to get generalized
|
||||
EmptyTagUnion => Rank::toplevel(),
|
||||
|
||||
EffectfulFunc => Rank::toplevel(),
|
||||
|
||||
Record(fields, ext_var) => {
|
||||
let mut rank = adjust_rank(subs, young_mark, visit_mark, group_rank, *ext_var);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue