From 3891679488d0aa2bc5edc924fbe743a9738cc820 Mon Sep 17 00:00:00 2001 From: Pavel Kalugin Date: Sun, 25 Oct 2020 00:42:07 +0300 Subject: [PATCH] Derive Hashable for MessageId so it could be used in HashMap Signed-off-by: Pavel Kalugin --- src/Telegram/Bot/API/Types.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Telegram/Bot/API/Types.hs b/src/Telegram/Bot/API/Types.hs index 0090ceb..5a3bfe9 100644 --- a/src/Telegram/Bot/API/Types.hs +++ b/src/Telegram/Bot/API/Types.hs @@ -137,7 +137,7 @@ data Message = Message -- | Unique message identifier inside this chat. newtype MessageId = MessageId Int32 - deriving (Eq, Show, ToJSON, FromJSON) + deriving (Eq, Show, ToJSON, FromJSON, Hashable) instance ToHttpApiData MessageId where toUrlPiece a = pack . show @Int32 $ coerce a -- 2.38.5