Treat untyped suffixed functions as effectful

This commit is contained in:
Agus Zubiaga 2024-10-23 22:33:57 -03:00
parent af6fc6306f
commit cfc4be5254
No known key found for this signature in database
25 changed files with 139 additions and 21 deletions

View file

@ -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);