From 049e91c0f9ac4389e5f08609c34136c095c42974 Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Mon, 20 Oct 2025 12:03:51 +0800 Subject: [PATCH] Add Hashable instances for Data.Semigroup.{Sum,Product}. --- src/Data/Hashable/Class.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Data/Hashable/Class.hs b/src/Data/Hashable/Class.hs index 9de9209..ca25ad1 100644 --- a/src/Data/Hashable/Class.hs +++ b/src/Data/Hashable/Class.hs @@ -776,6 +776,9 @@ instance Hashable1 NE.NonEmpty where deriving newtype instance Hashable a => Hashable (Semi.Min a) deriving newtype instance Hashable a => Hashable (Semi.Max a) +deriving newtype instance Hashable a => Hashable (Semi.Sum a) +deriving newtype instance Hashable a => Hashable (Semi.Product a) + -- | __Note__: Prior to @hashable-1.3.0.0@ the hash computation included the second argument of 'Arg' which wasn't consistent with its 'Eq' instance. -- -- Since @hashable-1.5.0.0@, @hash (Semi.arg a _) = hash a@