]> Git — Sourcephile - gargantext.git/blob - patches/duckling/0001-fix-missing-Eq-Dimension-a-needed-by-recent-hashable.patch
build: add nix flake support
[gargantext.git] / patches / duckling / 0001-fix-missing-Eq-Dimension-a-needed-by-recent-hashable.patch
1 From 696d5a0dd098bdbc6d3dd49722ed974b227d36db Mon Sep 17 00:00:00 2001
2 From: Julien Moutinho <julm+gargantext@sourcephile.fr>
3 Date: Thu, 29 Jun 2023 19:39:44 +0200
4 Subject: [PATCH 1/2] fix missing `Eq (Dimension a)` needed by recent
5 `hashable`
6
7 ---
8 Duckling/Types.hs | 3 +++
9 1 file changed, 3 insertions(+)
10
11 diff --git a/Duckling/Types.hs b/Duckling/Types.hs
12 index ec65063e..e44beb3d 100644
13 --- a/Duckling/Types.hs
14 +++ b/Duckling/Types.hs
15 @@ -177,6 +177,9 @@ instance Hashable (Dimension a) where
16 hashWithSalt s (CustomDimension _) = hashWithSalt s (14::Int)
17 hashWithSalt s CreditCardNumber = hashWithSalt s (15::Int)
18
19 +instance Eq (Dimension a) where
20 + x == y = isJust (geq x y)
21 +
22 instance GEq Dimension where
23 geq RegexMatch RegexMatch = Just Refl
24 geq RegexMatch _ = Nothing
25 --
26 2.40.1
27