mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Add ability slice to eq obligation checker
This commit is contained in:
parent
2961d1a8be
commit
0da72df5e9
2 changed files with 4 additions and 0 deletions
|
@ -1030,6 +1030,7 @@ impl DerivableVisitor for DeriveHash {
|
||||||
struct DeriveEq;
|
struct DeriveEq;
|
||||||
impl DerivableVisitor for DeriveEq {
|
impl DerivableVisitor for DeriveEq {
|
||||||
const ABILITY: Symbol = Symbol::BOOL_EQ;
|
const ABILITY: Symbol = Symbol::BOOL_EQ;
|
||||||
|
const ABILITY_SLICE: SubsSlice<Symbol> = Subs::AB_EQ;
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn is_derivable_builtin_opaque(symbol: Symbol) -> bool {
|
fn is_derivable_builtin_opaque(symbol: Symbol) -> bool {
|
||||||
|
|
|
@ -1685,6 +1685,8 @@ impl Subs {
|
||||||
pub const AB_HASHER: SubsSlice<Symbol> = SubsSlice::new(2, 1);
|
pub const AB_HASHER: SubsSlice<Symbol> = SubsSlice::new(2, 1);
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
pub const AB_HASH: SubsSlice<Symbol> = SubsSlice::new(3, 1);
|
pub const AB_HASH: SubsSlice<Symbol> = SubsSlice::new(3, 1);
|
||||||
|
#[rustfmt::skip]
|
||||||
|
pub const AB_EQ: SubsSlice<Symbol> = SubsSlice::new(4, 1);
|
||||||
|
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self::with_capacity(0)
|
Self::with_capacity(0)
|
||||||
|
@ -1708,6 +1710,7 @@ impl Subs {
|
||||||
symbol_names.push(Symbol::DECODE_DECODING);
|
symbol_names.push(Symbol::DECODE_DECODING);
|
||||||
symbol_names.push(Symbol::HASH_HASHER);
|
symbol_names.push(Symbol::HASH_HASHER);
|
||||||
symbol_names.push(Symbol::HASH_HASH_ABILITY);
|
symbol_names.push(Symbol::HASH_HASH_ABILITY);
|
||||||
|
symbol_names.push(Symbol::BOOL_EQ);
|
||||||
|
|
||||||
let mut subs = Subs {
|
let mut subs = Subs {
|
||||||
utable: UnificationTable::default(),
|
utable: UnificationTable::default(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue