From 696d5a0dd098bdbc6d3dd49722ed974b227d36db Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 29 Jun 2023 19:39:44 +0200 Subject: [PATCH 1/2] fix missing `Eq (Dimension a)` needed by recent `hashable` --- Duckling/Types.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Duckling/Types.hs b/Duckling/Types.hs index ec65063e..e44beb3d 100644 --- a/Duckling/Types.hs +++ b/Duckling/Types.hs @@ -177,6 +177,9 @@ instance Hashable (Dimension a) where hashWithSalt s (CustomDimension _) = hashWithSalt s (14::Int) hashWithSalt s CreditCardNumber = hashWithSalt s (15::Int) +instance Eq (Dimension a) where + x == y = isJust (geq x y) + instance GEq Dimension where geq RegexMatch RegexMatch = Just Refl geq RegexMatch _ = Nothing -- 2.40.1