mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +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
|
@ -67,9 +67,15 @@ pub enum NotDerivableContext {
|
|||
UnboundVar,
|
||||
Opaque(Symbol),
|
||||
Decode(NotDerivableDecode),
|
||||
Eq(NotDerivableEq),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
pub enum NotDerivableDecode {
|
||||
OptionalRecordField(Lowercase),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Clone)]
|
||||
pub enum NotDerivableEq {
|
||||
FloatingPoint,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue