Skip to content

Commit

Permalink
Add functor instance to Response
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewFenwick authored Mar 23, 2024
1 parent 16ea470 commit eef3034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telegram-bot-api/src/Telegram/Bot/API/MakingRequests.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -58,7 +59,7 @@ data Response a = Response
, responseResult :: a
, responseErrorCode :: Maybe Integer
, responseParameters :: Maybe ResponseParameters
} deriving (Show, Generic)
} deriving (Show, Generic, Functor)

instance ToJSON a => ToJSON (Response a) where toJSON = gtoJSON
instance FromJSON a => FromJSON (Response a) where parseJSON = gparseJSON
Expand Down

0 comments on commit eef3034

Please sign in to comment.