mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Coupon cutting
This commit is contained in:
parent
a242a90416
commit
c1b1f60630
4 changed files with 10 additions and 17 deletions
|
@ -4922,14 +4922,7 @@ fn get_specialization<'a>(
|
|||
Some(member) => {
|
||||
let snapshot = env.subs.snapshot();
|
||||
instantiate_rigids(env.subs, member.signature_var);
|
||||
let this_f = env.subs.get_content_without_compacting(symbol_var);
|
||||
let member_f = env
|
||||
.subs
|
||||
.get_content_without_compacting(member.signature_var);
|
||||
use roc_types::subs::SubsFmtContent;
|
||||
let this_f = SubsFmtContent(&this_f, env.subs);
|
||||
let member_f = SubsFmtContent(&member_f, env.subs);
|
||||
dbg!(symbol, this_f, member_f);
|
||||
|
||||
let (_, must_implement_ability) = unify(
|
||||
env.subs,
|
||||
symbol_var,
|
||||
|
@ -4938,6 +4931,7 @@ fn get_specialization<'a>(
|
|||
)
|
||||
.expect_success("This typechecked previously");
|
||||
env.subs.rollback_to(snapshot);
|
||||
|
||||
let specializing_type =
|
||||
type_implementing_member(&must_implement_ability, member.parent_ability);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue