Skip to content

Commit

Permalink
Merge pull request #172 from DrewFenwick/response-functor
Browse files Browse the repository at this point in the history
Add functor instance to Response
  • Loading branch information
swamp-agr authored Mar 28, 2024
2 parents 01f80a0 + eef3034 commit 02bd350
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 02bd350

Please sign in to comment.