mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-02 05:48:17 +00:00
Merge pull request #3531 from rtfeldman/decode
Very basic Decode.roc in the standard library
This commit is contained in:
commit
fa14146054
13 changed files with 588 additions and 90 deletions
|
|
@ -4916,10 +4916,8 @@ pub fn with_hole<'a>(
|
|||
UnspecializedExpr(symbol) => {
|
||||
match procs.ability_member_aliases.get(symbol).unwrap() {
|
||||
&self::AbilityMember(member) => {
|
||||
let resolved_proc = env.abilities.with_module_abilities_store(env.home, |store|
|
||||
resolve_ability_specialization(env.subs, store, member, fn_var)
|
||||
.expect("Recorded as an ability member, but it doesn't have a specialization")
|
||||
);
|
||||
let resolved_proc = resolve_ability_specialization(env.home, env.subs, &env.abilities, member, fn_var)
|
||||
.expect("Recorded as an ability member, but it doesn't have a specialization");
|
||||
|
||||
let resolved_proc = match resolved_proc {
|
||||
Resolved::Specialization(symbol) => symbol,
|
||||
|
|
@ -5227,12 +5225,14 @@ fn late_resolve_ability_specialization<'a>(
|
|||
env.subs[spec_symbol_index]
|
||||
} else {
|
||||
// Otherwise, resolve by checking the able var.
|
||||
let specialization = env
|
||||
.abilities
|
||||
.with_module_abilities_store(env.home, |store| {
|
||||
resolve_ability_specialization(env.subs, store, member, specialization_var)
|
||||
.expect("Ability specialization is unknown - code generation cannot proceed!")
|
||||
});
|
||||
let specialization = resolve_ability_specialization(
|
||||
env.home,
|
||||
env.subs,
|
||||
&env.abilities,
|
||||
member,
|
||||
specialization_var,
|
||||
)
|
||||
.expect("Ability specialization is unknown - code generation cannot proceed!");
|
||||
|
||||
match specialization {
|
||||
Resolved::Specialization(symbol) => symbol,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue