Skip to content

Commit

Permalink
use INSPECT_INSPECT_ABILITY instead of INSPECT_INSPECT
Browse files Browse the repository at this point in the history
  • Loading branch information
bhansconnect committed Nov 28, 2023
1 parent 0ed708e commit 70cb479
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/compiler/load/tests/test_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9744,7 +9744,7 @@ In roc, functions are always written as a lambda, like{}
Only builtin abilities can be derived.
Note: The builtin abilities are `Encoding`, `Decoding`, `Hash`, `Eq`
Note: The builtin abilities are `Encoding`, `Decoding`, `Hash`, `Eq`, `Inspect`
"###
);

Expand Down
5 changes: 4 additions & 1 deletion crates/compiler/module/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ pub const DERIVABLE_ABILITIES: &[(Symbol, &[Symbol])] = &[
(Symbol::DECODE_DECODING, &[Symbol::DECODE_DECODER]),
(Symbol::HASH_HASH_ABILITY, &[Symbol::HASH_HASH]),
(Symbol::BOOL_EQ, &[Symbol::BOOL_IS_EQ]),
(Symbol::INSPECT_INSPECT, &[Symbol::INSPECT_TO_INSPECTOR]),
(
Symbol::INSPECT_INSPECT_ABILITY,
&[Symbol::INSPECT_TO_INSPECTOR],
),
];

/// In Debug builds only, Symbol has a name() method that lets
Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/solve/src/ability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ trait DerivableVisitor {

struct DeriveInspect;
impl DerivableVisitor for DeriveInspect {
const ABILITY: Symbol = Symbol::INSPECT_INSPECT;
const ABILITY: Symbol = Symbol::INSPECT_INSPECT_ABILITY;
const ABILITY_SLICE: SubsSlice<Symbol> = Subs::AB_INSPECT;

#[inline(always)]
Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/types/src/subs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,7 @@ impl Subs {
symbol_names.push(Symbol::HASH_HASHER);
symbol_names.push(Symbol::HASH_HASH_ABILITY);
symbol_names.push(Symbol::BOOL_EQ);
symbol_names.push(Symbol::INSPECT_INSPECT);
symbol_names.push(Symbol::INSPECT_INSPECT_ABILITY);
// END INIT-SymbolNames

// IFTTT INIT-VariableSubsSlice
Expand Down

0 comments on commit 70cb479

Please sign in to comment.