mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 21:40:58 +00:00
make effectful functions unify properly
This commit is contained in:
parent
d7556be7bf
commit
8549e48d0b
1 changed files with 11 additions and 0 deletions
|
|
@ -3345,6 +3345,17 @@ fn unify_flat_type<M: MetaCollector>(
|
|||
|
||||
outcome
|
||||
}
|
||||
(Func(args, closure, ret, fx), EffectfulFunc) => {
|
||||
let mut outcome = unify_pool(env, pool, *fx, Variable::EFFECTFUL, ctx.mode);
|
||||
|
||||
outcome.union(merge(
|
||||
env,
|
||||
ctx,
|
||||
Structure(Func(*args, *closure, *ret, Variable::EFFECTFUL)),
|
||||
));
|
||||
|
||||
outcome
|
||||
}
|
||||
(FunctionOrTagUnion(tag_names, tag_symbols, ext), Func(args, closure, ret, fx)) => {
|
||||
unify_function_or_tag_union_and_func(
|
||||
env,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue