~gdanix/telegram-bot-simple

3891679488d0aa2bc5edc924fbe743a9738cc820 — Pavel Kalugin 2 years ago 9d8f65b
Derive Hashable for MessageId so it could be used in HashMap

Signed-off-by: Pavel Kalugin <paul.kalug@gmail.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M src/Telegram/Bot/API/Types.hs
M src/Telegram/Bot/API/Types.hs => src/Telegram/Bot/API/Types.hs +1 -1
@@ 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