mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-08 21:10:32 +00:00
Implement obligation checking for the Eq
ability
Every type can have `Eq.isEq` derived for it, as long as - it does not transitively contain a function - it does not transitively contain a floating point value - it does not transitively contain an opaque type that does not support `Eq`
This commit is contained in:
parent
5931dd5fc2
commit
b587bcf0c2
5 changed files with 437 additions and 81 deletions
|
@ -51,6 +51,7 @@ pub const DERIVABLE_ABILITIES: &[(Symbol, &[Symbol])] = &[
|
|||
(Symbol::ENCODE_ENCODING, &[Symbol::ENCODE_TO_ENCODER]),
|
||||
(Symbol::DECODE_DECODING, &[Symbol::DECODE_DECODER]),
|
||||
(Symbol::HASH_HASH_ABILITY, &[Symbol::HASH_HASH]),
|
||||
(Symbol::EQ_EQ, &[Symbol::EQ_IS_EQ]),
|
||||
];
|
||||
|
||||
/// In Debug builds only, Symbol has a name() method that lets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue