Add decidable equality class
Currently, we have a TestEquality class
class TestEquality f where
testEquality :: f a -> f b -> Maybe (a :~: b)
It would be nice to add a class for fully decidable equality. There are a few options, but this one gets to the point rather quickly:
data EqDec a b where
NotEqual :: (forall c . a :~: b -> c) -> EqDec a b
Equal :: EqDec a a
class DecEq f where
decEq :: f a -> f b -> EqDec a b
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Core Libraries |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | ekmett |
| Operating system | |
| Architecture |