Future equality function

This commit is contained in:
Stephane Bortzmeyer 2023-10-01 18:47:01 +02:00
parent fa372d98e4
commit 8a342ecf20

View File

@ -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) ...