From 8a342ecf20915e7d6a6e665b1543ba7d53996126 Mon Sep 17 00:00:00 2001 From: Stephane Bortzmeyer Date: Sun, 1 Oct 2023 18:47:01 +0200 Subject: [PATCH] Future equality function --- Types.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Types.hs b/Types.hs index 6be0223..e1c700e 100644 --- a/Types.hs +++ b/Types.hs @@ -15,7 +15,9 @@ type Extensions = [Extension] type Grandfathered = String type Privateuse = [String] -data Tag = Tag Language Extlang Script Region Variants Extensions | GF Grandfathered | Priv Privateuse deriving (Show, Eq) --- TODO: warning, Eq must --- be redefined because it needs to take into account case-insensitivity and --- (maybe) canonicalization +data Tag = Tag Language Extlang Script Region Variants Extensions | GF Grandfathered | Priv Privateuse deriving (Show) +-- Warning, Eq must be redefined because it needs to take into account +-- case-insensitivity and (maybe) canonicalization (see issue #10). +-- Complicated because Tag is not a string. Sopmething like: +-- instance Eq Tag where +-- a == b = (Language a) == (Language b) ...