mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Fast-path for determining ability member impls for builtin opaques
This commit is contained in:
parent
297a571b34
commit
e6094df69b
8 changed files with 182 additions and 60 deletions
|
@ -24,7 +24,10 @@ use roc_types::{
|
|||
};
|
||||
use roc_unify::unify::{unify, Env as UEnv, Mode, MustImplementConstraints};
|
||||
|
||||
use crate::solve::{deep_copy_var_in, introduce, Pools};
|
||||
use crate::{
|
||||
ability::builtin_module_with_unlisted_ability_impl,
|
||||
solve::{deep_copy_var_in, introduce, Pools},
|
||||
};
|
||||
|
||||
/// What phase in the compiler is reaching out to specialize lambda sets?
|
||||
/// This is important to distinguish subtle differences in the behavior of the solving algorithm.
|
||||
|
@ -626,7 +629,7 @@ fn make_specialization_decision<P: Phase>(
|
|||
use SpecializationTypeKey::*;
|
||||
match subs.get_content_without_compacting(var) {
|
||||
Alias(opaque, _, _, AliasKind::Opaque)
|
||||
if !matches!(opaque.module_id(), ModuleId::NUM | ModuleId::BOOL) =>
|
||||
if !builtin_module_with_unlisted_ability_impl(opaque.module_id()) =>
|
||||
{
|
||||
if P::IS_LATE {
|
||||
SpecializeDecision::Specialize(Opaque(*opaque))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue