diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index bb4e2c16..2e003f87 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20250506 +# version: 0.19.20250821 # -# REGENDATA ("0.19.20250506",["--config=cabal.haskell-ci","github","cabal.project"]) +# REGENDATA ("0.19.20250821",["--config=cabal.haskell-ci","github","cabal.project"]) # name: Haskell-CI on: @@ -32,6 +32,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.14.0.20250819 + compilerKind: ghc + compilerVersion: 9.14.0.20250819 + setup-method: ghcup-prerelease + allow-failure: false - compiler: ghc-9.12.2 compilerKind: ghc compilerVersion: 9.12.2 @@ -105,8 +110,8 @@ jobs: chmod a+x "$HOME/.ghcup/bin/ghcup" - name: Install cabal-install run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -121,6 +126,21 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} + - name: Install GHC (GHCup prerelease) + if: matrix.setup-method == 'ghcup-prerelease' + run: | + "$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases + "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') + echo "HC=$HC" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH @@ -131,7 +151,7 @@ jobs: echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" + if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} @@ -159,6 +179,18 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF + if $HEADHACKAGE; then + cat >> $CABAL_CONFIG <> $CABAL_CONFIG <> cabal.project if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "packages: ${PKGDIR_github_samples}" >> cabal.project ; fi echo "package github" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project + echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "package github-samples" >> cabal.project ; fi - if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package github" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package github-samples" >> cabal.project ; fi + if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi cat >> cabal.project <> cabal.project + fi $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local diff --git a/CHANGELOG.md b/CHANGELOG.md index 45c00f5a..014e7e29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## Changes for 0.30.0.1 + +_2025-08-27, Andreas Abel_ + +- Drop dependencies `deepseq-generics` and `transformers-compat`. +- Remove obsolete `deriving Typeable`. + +Tested with GHC 8.2 - 9.14 alpha1. + ## Changes for 0.30 _2025-05-09, Andreas Abel, Peace edition_ diff --git a/cabal.haskell-ci b/cabal.haskell-ci index ccddf4a2..e44b77d2 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -3,6 +3,11 @@ haddock: >=8.6 -- See PR #355: haddocks for GADT constructor arguments only supported from GHC 8.6 jobs-selection: any +-- Package github-samples uses "include" for dependencies, +-- so they are a superset. +-- Dissecting this is a waste of time, so I turn -Werror=unused-packages off +error-unused-packages: False + -- Some dependencies do not allow mtl-2.3 yet, so this doesn't pass yet: -- constraint-set mtl-2.3 -- ghc: >= 8.6 diff --git a/github.cabal b/github.cabal index 517468bc..759c9f95 100644 --- a/github.cabal +++ b/github.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: github -version: 0.30 +version: 0.30.0.1 synopsis: Access to the GitHub API, v3. category: Network description: @@ -30,6 +30,7 @@ copyright: Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016-2021 Oleg Grenrus tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -184,17 +185,18 @@ library autogen-modules: Paths_github -- Packages bundles with GHC, mtl and text are also here + -- Lower bounds at least those of https://www.stackage.org/lts-10.0 (GHC 8.2.2) build-depends: base >=4.10 && <5 - , binary >=0.7.1.0 && <0.11 - , bytestring >=0.10.4.0 && <0.13 - , containers >=0.5.5.1 && <1 - , deepseq >=1.3.0.2 && <1.6 + , binary >=0.8.5.1 && <0.11 + , bytestring >=0.10.8.2 && <0.13 + , containers >=0.5.10.2 && <1 + , deepseq >=1.4.3.0 && <1.6 , exceptions >=0.10.2 && <0.11 - , mtl >=2.1.3.1 && <2.2 || >=2.2.1 && <2.4 - , text >=1.2.0.6 && <2.2 + , mtl >=2.2.1 && <2.4 + , text >=1.2.2.2 && <2.2 , time >=1.8.0.2 && <2 - , transformers >=0.3.0.0 && <0.7 + , transformers >=0.5.2.0 && <0.7 -- other packages build-depends: @@ -203,7 +205,6 @@ library , base16-bytestring >=0.1.1.6 && <1.1 , binary-instances >=1 && <1.1 , cryptohash-sha1 >=0.11.100.1 && <0.12 - , deepseq-generics >=0.2.0.0 && <0.3 , hashable >=1.2.7.0 && <2 , http-client >=0.5.12 && <0.8 , http-link-header >=1.0.3.1 && <1.3 @@ -211,7 +212,6 @@ library , iso8601-time >=0.1.5 && <0.2 , network-uri >=2.6.1.0 && <2.7 , tagged >=0.8.5 && <0.9 - , transformers-compat >=0.6.5 && <0.8 , unordered-containers >=0.2.10.0 && <0.3 , vector >=0.12.0.1 && <0.14 diff --git a/samples/github-samples.cabal b/samples/github-samples.cabal index 2fd3287a..2e7a8699 100644 --- a/samples/github-samples.cabal +++ b/samples/github-samples.cabal @@ -10,6 +10,7 @@ description: Various samples of github package build-type: Simple tested-with: + GHC == 9.14.1 GHC == 9.12.2 GHC == 9.10.2 GHC == 9.8.4 @@ -28,7 +29,6 @@ library build-depends: , base >=4.11 && <5 -- require base-4.11 because then (<>) is in Prelude - , base-compat-batteries , github , text diff --git a/spec/GitHub/ReposSpec.hs b/spec/GitHub/ReposSpec.hs index 45c32415..9ccc7066 100644 --- a/spec/GitHub/ReposSpec.hs +++ b/spec/GitHub/ReposSpec.hs @@ -1,4 +1,10 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} + +#if __GLASGOW_HASKELL__ >= 900 +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} +#endif + module GitHub.ReposSpec where import GitHub diff --git a/src/GitHub/Auth.hs b/src/GitHub/Auth.hs index 2b41dbf4..cd53cd2e 100644 --- a/src/GitHub/Auth.hs +++ b/src/GitHub/Auth.hs @@ -23,9 +23,9 @@ data Auth | OAuth Token -- ^ OAuth token | JWT JWTToken -- ^ JWT Token | EnterpriseOAuth Text Token -- ^ Custom endpoint and OAuth token - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Auth where rnf = genericRnf +instance NFData Auth instance Binary Auth instance Hashable Auth diff --git a/src/GitHub/Data/Actions/Artifacts.hs b/src/GitHub/Data/Actions/Artifacts.hs index 7b572d2b..9d8ca28e 100644 --- a/src/GitHub/Data/Actions/Artifacts.hs +++ b/src/GitHub/Data/Actions/Artifacts.hs @@ -27,7 +27,7 @@ data ArtifactWorkflowRun = ArtifactWorkflowRun , artifactWorkflowRunHeadBranch :: !Text , artifactWorkflowRunHeadSha :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data Artifact = Artifact { artifactArchiveDownloadUrl :: !URL @@ -42,7 +42,7 @@ data Artifact = Artifact , artifactUrl :: !URL , artifactWorkflowRun :: !ArtifactWorkflowRun } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) ------------------------------------------------------------------------------- -- JSON instances diff --git a/src/GitHub/Data/Actions/Cache.hs b/src/GitHub/Data/Actions/Cache.hs index a4f65a60..363e0ce3 100644 --- a/src/GitHub/Data/Actions/Cache.hs +++ b/src/GitHub/Data/Actions/Cache.hs @@ -27,20 +27,20 @@ data Cache = Cache , cacheCreatedAt :: !UTCTime , cacheSizeInBytes :: !Int } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data RepositoryCacheUsage = RepositoryCacheUsage { repositoryCacheUsageFullName :: !Text , repositoryCacheUsageActiveCachesSizeInBytes :: !Int , repositoryCacheUsageActiveCachesCount :: !Int } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data OrganizationCacheUsage = OrganizationCacheUsage { organizationCacheUsageTotalActiveCachesSizeInBytes :: !Int , organizationCacheUsageTotalActiveCachesCount :: !Int } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) ------------------------------------------------------------------------------- -- JSON instances diff --git a/src/GitHub/Data/Actions/Common.hs b/src/GitHub/Data/Actions/Common.hs index ed02b6f0..76a6130a 100644 --- a/src/GitHub/Data/Actions/Common.hs +++ b/src/GitHub/Data/Actions/Common.hs @@ -20,7 +20,7 @@ data WithTotalCount a = WithTotalCount , withTotalCountTotalCount :: !Int -- ^ The total size of the answer. } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -- | Joining two pages of a paginated response. -- The 'withTotalCountTotalCount' is assumed to be the same in both pages, diff --git a/src/GitHub/Data/Actions/Secrets.hs b/src/GitHub/Data/Actions/Secrets.hs index c734ad89..1e2ce31b 100644 --- a/src/GitHub/Data/Actions/Secrets.hs +++ b/src/GitHub/Data/Actions/Secrets.hs @@ -33,13 +33,13 @@ data OrganizationSecret = OrganizationSecret , organizationSecretUpdatedAt :: !UTCTime , organizationSecretVisibility :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data PublicKey = PublicKey { publicKeyId :: !Text , publicKeyKey :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data SetSecret = SetSecret { setSecretPublicKeyId :: !Text @@ -47,35 +47,35 @@ data SetSecret = SetSecret , setSecretVisibility :: !Text , setSecretSelectedRepositoryIds :: !(Maybe [Id Repo]) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data SetRepoSecret = SetRepoSecret { setRepoSecretPublicKeyId :: !Text , setRepoSecretEncryptedValue :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data SelectedRepo = SelectedRepo { selectedRepoRepoId :: !(Id Repo) , selectedRepoRepoName :: !(Name Repo) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data SetSelectedRepositories = SetSelectedRepositories { setSelectedRepositoriesRepositoryIds :: ![Id Repo] } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data RepoSecret = RepoSecret { repoSecretName :: !(Name RepoSecret) , repoSecretCreatedAt :: !UTCTime , repoSecretUpdatedAt :: !UTCTime } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -- TODO move somewhere else? data Environment = Environment - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) ------------------------------------------------------------------------------- -- JSON instances diff --git a/src/GitHub/Data/Actions/WorkflowJobs.hs b/src/GitHub/Data/Actions/WorkflowJobs.hs index 05f28861..47f11f20 100644 --- a/src/GitHub/Data/Actions/WorkflowJobs.hs +++ b/src/GitHub/Data/Actions/WorkflowJobs.hs @@ -10,7 +10,7 @@ module GitHub.Data.Actions.WorkflowJobs ( import Prelude () import GitHub.Internal.Prelude (Applicative ((<*>)), Data, Eq, FromJSON (parseJSON), Generic, Integer, - Ord, Show, Text, Typeable, UTCTime, Vector, withObject, ($), (.:), + Ord, Show, Text, UTCTime, Vector, withObject, ($), (.:), (<$>)) import GitHub.Data.Id (Id) @@ -32,7 +32,7 @@ data JobStep = JobStep , jobStepStartedAt :: !UTCTime , jobStepCompletedAt :: !UTCTime } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data Job = Job { jobId :: !(Id Job) @@ -56,7 +56,7 @@ data Job = Job , jobRunnerGroupId :: !Integer , jobRunnerGroupName :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) ------------------------------------------------------------------------------- -- JSON instances diff --git a/src/GitHub/Data/Actions/WorkflowRuns.hs b/src/GitHub/Data/Actions/WorkflowRuns.hs index 3dae581b..07657e84 100644 --- a/src/GitHub/Data/Actions/WorkflowRuns.hs +++ b/src/GitHub/Data/Actions/WorkflowRuns.hs @@ -41,10 +41,10 @@ data WorkflowRun = WorkflowRun , workflowRunAttempt :: !Integer , workflowRunStartedAt :: !UTCTime } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data RunAttempt = RunAttempt - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data ReviewHistory = ReviewHistory { reviewHistoryState :: !Text @@ -52,7 +52,7 @@ data ReviewHistory = ReviewHistory , reviewHistoryUser :: !SimpleUser } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) ------------------------------------------------------------------------------- -- JSON instances diff --git a/src/GitHub/Data/Actions/Workflows.hs b/src/GitHub/Data/Actions/Workflows.hs index 9dd2252d..a75fa0ff 100644 --- a/src/GitHub/Data/Actions/Workflows.hs +++ b/src/GitHub/Data/Actions/Workflows.hs @@ -25,7 +25,7 @@ data Workflow = Workflow , workflowHtmlUrl :: !URL , workflowBadgeUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) data CreateWorkflowDispatchEvent a = CreateWorkflowDispatchEvent { createWorkflowDispatchEventRef :: !Text @@ -33,7 +33,7 @@ data CreateWorkflowDispatchEvent a = CreateWorkflowDispatchEvent } deriving (Show, Generic) -instance (NFData a) => NFData (CreateWorkflowDispatchEvent a) where rnf = genericRnf +instance (NFData a) => NFData (CreateWorkflowDispatchEvent a) instance (Binary a) => Binary (CreateWorkflowDispatchEvent a) ------------------------------------------------------------------------------- diff --git a/src/GitHub/Data/Activities.hs b/src/GitHub/Data/Activities.hs index 540241c8..b480ef21 100644 --- a/src/GitHub/Data/Activities.hs +++ b/src/GitHub/Data/Activities.hs @@ -13,9 +13,9 @@ data RepoStarred = RepoStarred { repoStarredStarredAt :: !UTCTime , repoStarredRepo :: !Repo } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RepoStarred where rnf = genericRnf +instance NFData RepoStarred instance Binary RepoStarred -- JSON Instances @@ -33,9 +33,9 @@ data Subject = Subject -- TODO: Make an ADT for this. , subjectType :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Subject where rnf = genericRnf +instance NFData Subject instance Binary Subject instance FromJSON Subject where @@ -61,9 +61,9 @@ data NotificationReason | StateChangeReason | SubscribedReason | TeamMentionReason - deriving (Show, Data, Enum, Bounded, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Enum, Bounded, Eq, Ord, Generic) -instance NFData NotificationReason where rnf = genericRnf +instance NFData NotificationReason instance Binary NotificationReason instance FromJSON NotificationReason where @@ -97,9 +97,9 @@ data Notification = Notification , notificationLastReadAt :: !(Maybe UTCTime) , notificationUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Notification where rnf = genericRnf +instance NFData Notification instance Binary Notification instance FromJSON Notification where diff --git a/src/GitHub/Data/Comments.hs b/src/GitHub/Data/Comments.hs index d4a9194d..c5987c77 100644 --- a/src/GitHub/Data/Comments.hs +++ b/src/GitHub/Data/Comments.hs @@ -19,9 +19,9 @@ data Comment = Comment , commentUser :: !SimpleUser , commentId :: !(Id Comment) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Comment where rnf = genericRnf +instance NFData Comment instance Binary Comment instance FromJSON Comment where @@ -41,9 +41,9 @@ instance FromJSON Comment where data NewComment = NewComment { newCommentBody :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewComment where rnf = genericRnf +instance NFData NewComment instance Binary NewComment instance ToJSON NewComment where @@ -52,9 +52,9 @@ instance ToJSON NewComment where data EditComment = EditComment { editCommentBody :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData EditComment where rnf = genericRnf +instance NFData EditComment instance Binary EditComment instance ToJSON EditComment where @@ -66,9 +66,9 @@ data NewPullComment = NewPullComment , newPullCommentPosition :: !Int , newPullCommentBody :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewPullComment where rnf = genericRnf +instance NFData NewPullComment instance Binary NewPullComment instance ToJSON NewPullComment where @@ -82,9 +82,9 @@ instance ToJSON NewPullComment where data PullCommentReply = PullCommentReply { pullCommentReplyBody :: Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData PullCommentReply where rnf = genericRnf +instance NFData PullCommentReply instance ToJSON PullCommentReply where toJSON (PullCommentReply b) = diff --git a/src/GitHub/Data/Content.hs b/src/GitHub/Data/Content.hs index d776c2b6..5e0c4b92 100644 --- a/src/GitHub/Data/Content.hs +++ b/src/GitHub/Data/Content.hs @@ -18,9 +18,9 @@ import Data.Aeson (Key) data Content = ContentFile !ContentFileData | ContentDirectory !(Vector ContentItem) - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Content where rnf = genericRnf +instance NFData Content instance Binary Content data ContentFileData = ContentFileData { @@ -28,24 +28,24 @@ data ContentFileData = ContentFileData { ,contentFileEncoding :: !Text ,contentFileSize :: !Int ,contentFileContent :: !Text -} deriving (Show, Data, Typeable, Eq, Ord, Generic) +} deriving (Show, Data, Eq, Ord, Generic) -instance NFData ContentFileData where rnf = genericRnf +instance NFData ContentFileData instance Binary ContentFileData -- | An item in a directory listing. data ContentItem = ContentItem { contentItemType :: !ContentItemType ,contentItemInfo :: !ContentInfo -} deriving (Show, Data, Typeable, Eq, Ord, Generic) +} deriving (Show, Data, Eq, Ord, Generic) -instance NFData ContentItem where rnf = genericRnf +instance NFData ContentItem instance Binary ContentItem data ContentItemType = ItemFile | ItemDir - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData ContentItemType where rnf = genericRnf +instance NFData ContentItemType instance Binary ContentItemType -- | Information common to both kinds of Content: files and directories. @@ -56,34 +56,34 @@ data ContentInfo = ContentInfo { ,contentUrl :: !URL ,contentGitUrl :: !URL ,contentHtmlUrl :: !URL -} deriving (Show, Data, Typeable, Eq, Ord, Generic) +} deriving (Show, Data, Eq, Ord, Generic) -instance NFData ContentInfo where rnf = genericRnf +instance NFData ContentInfo instance Binary ContentInfo data ContentResultInfo = ContentResultInfo { contentResultInfo :: !ContentInfo , contentResultSize :: !Int - } deriving (Show, Data, Typeable, Eq, Ord, Generic) + } deriving (Show, Data, Eq, Ord, Generic) -instance NFData ContentResultInfo where rnf = genericRnf +instance NFData ContentResultInfo instance Binary ContentResultInfo data ContentResult = ContentResult { contentResultContent :: !ContentResultInfo , contentResultCommit :: !GitCommit - } deriving (Show, Data, Typeable, Eq, Ord, Generic) + } deriving (Show, Data, Eq, Ord, Generic) -instance NFData ContentResult where rnf = genericRnf +instance NFData ContentResult instance Binary ContentResult data Author = Author { authorName :: !Text , authorEmail :: !Text } - deriving (Eq, Ord, Show, Data, Typeable, Generic) + deriving (Eq, Ord, Show, Data, Generic) -instance NFData Author where rnf = genericRnf +instance NFData Author instance Binary Author data CreateFile = CreateFile @@ -94,9 +94,9 @@ data CreateFile = CreateFile , createFileAuthor :: !(Maybe Author) , createFileCommitter :: !(Maybe Author) } - deriving (Eq, Ord, Show, Data, Typeable, Generic) + deriving (Eq, Ord, Show, Data, Generic) -instance NFData CreateFile where rnf = genericRnf +instance NFData CreateFile instance Binary CreateFile data UpdateFile = UpdateFile @@ -108,9 +108,9 @@ data UpdateFile = UpdateFile , updateFileAuthor :: !(Maybe Author) , updateFileCommitter :: !(Maybe Author) } - deriving (Eq, Ord, Show, Data, Typeable, Generic) + deriving (Eq, Ord, Show, Data, Generic) -instance NFData UpdateFile where rnf = genericRnf +instance NFData UpdateFile instance Binary UpdateFile data DeleteFile = DeleteFile @@ -121,9 +121,9 @@ data DeleteFile = DeleteFile , deleteFileAuthor :: !(Maybe Author) , deleteFileCommitter :: !(Maybe Author) } - deriving (Eq, Ord, Show, Data, Typeable, Generic) + deriving (Eq, Ord, Show, Data, Generic) -instance NFData DeleteFile where rnf = genericRnf +instance NFData DeleteFile instance Binary DeleteFile instance FromJSON Content where diff --git a/src/GitHub/Data/Definitions.hs b/src/GitHub/Data/Definitions.hs index 456974f7..12f392df 100644 --- a/src/GitHub/Data/Definitions.hs +++ b/src/GitHub/Data/Definitions.hs @@ -22,13 +22,13 @@ data Error | ParseError !Text -- ^ An error in the parser itself. | JsonError !Text -- ^ The JSON is malformed or unexpected. | UserError !Text -- ^ Incorrect input. - deriving (Show, Typeable) + deriving (Show) instance E.Exception Error -- | Type of the repository owners. data OwnerType = OwnerUser | OwnerOrganization | OwnerBot - deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic, Typeable, Data) + deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic, Data) instance NFData OwnerType instance Binary OwnerType @@ -39,9 +39,9 @@ data SimpleUser = SimpleUser , simpleUserAvatarUrl :: !URL , simpleUserUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData SimpleUser where rnf = genericRnf +instance NFData SimpleUser instance Binary SimpleUser data SimpleOrganization = SimpleOrganization @@ -50,9 +50,9 @@ data SimpleOrganization = SimpleOrganization , simpleOrganizationUrl :: !URL , simpleOrganizationAvatarUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData SimpleOrganization where rnf = genericRnf +instance NFData SimpleOrganization instance Binary SimpleOrganization -- | Sometimes we don't know the type of the owner, e.g. in 'Repo' @@ -63,9 +63,9 @@ data SimpleOwner = SimpleOwner , simpleOwnerAvatarUrl :: !URL , simpleOwnerType :: !OwnerType } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData SimpleOwner where rnf = genericRnf +instance NFData SimpleOwner instance Binary SimpleOwner data User = User @@ -88,9 +88,9 @@ data User = User , userUrl :: !URL , userHtmlUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData User where rnf = genericRnf +instance NFData User instance Binary User data Organization = Organization @@ -111,16 +111,16 @@ data Organization = Organization , organizationUrl :: !URL , organizationCreatedAt :: !UTCTime } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Organization where rnf = genericRnf +instance NFData Organization instance Binary Organization -- | In practice you can't have concrete values of 'Owner'. newtype Owner = Owner (Either User Organization) - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Owner where rnf = genericRnf +instance NFData Owner instance Binary Owner fromOwner :: Owner -> Either User Organization @@ -218,14 +218,14 @@ instance FromJSON Owner where data OrgMemberFilter = OrgMemberFilter2faDisabled -- ^ Members without two-factor authentication enabled. Available for organization owners. | OrgMemberFilterAll -- ^ All members the authenticated user can see. - deriving (Show, Eq, Ord, Enum, Bounded, Typeable, Data, Generic) + deriving (Show, Eq, Ord, Enum, Bounded, Data, Generic) -- | Filter members returned by their role. data OrgMemberRole = OrgMemberRoleAll -- ^ All members of the organization, regardless of role. | OrgMemberRoleAdmin -- ^ Organization owners. | OrgMemberRoleMember -- ^ Non-owner organization members. - deriving (Show, Eq, Ord, Enum, Bounded, Typeable, Data, Generic) + deriving (Show, Eq, Ord, Enum, Bounded, Data, Generic) -- | Request query string type QueryString = [(BS.ByteString, Maybe BS.ByteString)] @@ -240,9 +240,9 @@ data MembershipRole | MembershipRoleAdmin | MembershipRoleBillingManager deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) -instance NFData MembershipRole where rnf = genericRnf +instance NFData MembershipRole instance Binary MembershipRole instance FromJSON MembershipRole where @@ -255,9 +255,9 @@ instance FromJSON MembershipRole where data MembershipState = MembershipPending | MembershipActive - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData MembershipState where rnf = genericRnf +instance NFData MembershipState instance Binary MembershipState instance FromJSON MembershipState where @@ -275,9 +275,9 @@ data Membership = Membership , membershipOrganization :: !SimpleOrganization , membershipUser :: !SimpleUser } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Membership where rnf = genericRnf +instance NFData Membership instance Binary Membership instance FromJSON Membership where @@ -295,7 +295,7 @@ instance FromJSON Membership where ------------------------------------------------------------------------------- newtype IssueNumber = IssueNumber Int - deriving (Eq, Ord, Show, Generic, Typeable, Data) + deriving (Eq, Ord, Show, Generic, Data) unIssueNumber :: IssueNumber -> Int unIssueNumber (IssueNumber i) = i @@ -322,9 +322,9 @@ data IssueLabel = IssueLabel , labelName :: !(Name IssueLabel) , labelDesc :: !(Maybe Text) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData IssueLabel where rnf = genericRnf +instance NFData IssueLabel instance Binary IssueLabel instance FromJSON IssueLabel where @@ -344,9 +344,9 @@ data NewIssueLabel = NewIssueLabel , newLabelName :: !(Name NewIssueLabel) , newLabelDesc :: !(Maybe Text) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewIssueLabel where rnf = genericRnf +instance NFData NewIssueLabel instance Binary NewIssueLabel @@ -371,9 +371,9 @@ data UpdateIssueLabel = UpdateIssueLabel , updateLabelName :: !(Name UpdateIssueLabel) , updateLabelDesc :: !(Maybe Text) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData UpdateIssueLabel where rnf = genericRnf +instance NFData UpdateIssueLabel instance Binary UpdateIssueLabel diff --git a/src/GitHub/Data/DeployKeys.hs b/src/GitHub/Data/DeployKeys.hs index 7dd1bb1d..af43c6cf 100644 --- a/src/GitHub/Data/DeployKeys.hs +++ b/src/GitHub/Data/DeployKeys.hs @@ -19,7 +19,7 @@ data RepoDeployKey = RepoDeployKey , repoDeployKeyCreatedAt :: !UTCTime , repoDeployKeyReadOnly :: !Bool } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance FromJSON RepoDeployKey where parseJSON = withObject "RepoDeployKey" $ \o -> RepoDeployKey @@ -36,7 +36,7 @@ data NewRepoDeployKey = NewRepoDeployKey , newRepoDeployKeyTitle :: !Text , newRepoDeployKeyReadOnly :: !Bool } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance ToJSON NewRepoDeployKey where toJSON (NewRepoDeployKey key title readOnly) = object diff --git a/src/GitHub/Data/Deployments.hs b/src/GitHub/Data/Deployments.hs index e14a214e..043e74be 100644 --- a/src/GitHub/Data/Deployments.hs +++ b/src/GitHub/Data/Deployments.hs @@ -34,9 +34,9 @@ data DeploymentQueryOption | DeploymentQueryRef !Text | DeploymentQueryTask !Text | DeploymentQueryEnvironment !Text - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData DeploymentQueryOption where rnf = genericRnf +instance NFData DeploymentQueryOption instance Binary DeploymentQueryOption renderDeploymentQueryOption :: DeploymentQueryOption -> (ByteString, ByteString) @@ -61,9 +61,9 @@ data Deployment a = Deployment , deploymentUpdatedAt :: !UTCTime , deploymentStatusesUrl :: !URL , deploymentRepositoryUrl :: !URL - } deriving (Show, Data, Typeable, Eq, Ord, Generic) + } deriving (Show, Data, Eq, Ord, Generic) -instance NFData a => NFData (Deployment a) where rnf = genericRnf +instance NFData a => NFData (Deployment a) instance Binary a => Binary (Deployment a) instance FromJSON a => FromJSON (Deployment a) where @@ -104,9 +104,9 @@ data CreateDeployment a = CreateDeployment -- qa). Default: production , createDeploymentDescription :: !(Maybe Text) -- ^ Short description of the deployment. Default: "" - } deriving (Show, Data, Typeable, Eq, Ord, Generic) + } deriving (Show, Data, Eq, Ord, Generic) -instance NFData a => NFData (CreateDeployment a) where rnf = genericRnf +instance NFData a => NFData (CreateDeployment a) instance Binary a => Binary (CreateDeployment a) instance ToJSON a => ToJSON (CreateDeployment a) where @@ -132,9 +132,9 @@ data DeploymentStatus = DeploymentStatus , deploymentStatusUpdatedAt :: !UTCTime , deploymentStatusDeploymentUrl :: !URL , deploymentStatusRepositoryUrl :: !URL - } deriving (Show, Data, Typeable, Eq, Ord, Generic) + } deriving (Show, Data, Eq, Ord, Generic) -instance NFData DeploymentStatus where rnf = genericRnf +instance NFData DeploymentStatus instance Binary DeploymentStatus instance FromJSON DeploymentStatus where @@ -157,9 +157,9 @@ data DeploymentStatusState | DeploymentStatusPending | DeploymentStatusSuccess | DeploymentStatusInactive - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData DeploymentStatusState where rnf = genericRnf +instance NFData DeploymentStatusState instance Binary DeploymentStatusState instance ToJSON DeploymentStatusState where @@ -190,9 +190,9 @@ data CreateDeploymentStatus = CreateDeploymentStatus , createDeploymentStatusDescription :: !(Maybe Text) -- ^ A short description of the status. Maximum length of 140 characters. -- Default: "" - } deriving (Show, Data, Typeable, Eq, Ord, Generic) + } deriving (Show, Data, Eq, Ord, Generic) -instance NFData CreateDeploymentStatus where rnf = genericRnf +instance NFData CreateDeploymentStatus instance Binary CreateDeploymentStatus instance ToJSON CreateDeploymentStatus where diff --git a/src/GitHub/Data/Email.hs b/src/GitHub/Data/Email.hs index 9ff578b6..76efafa0 100644 --- a/src/GitHub/Data/Email.hs +++ b/src/GitHub/Data/Email.hs @@ -8,9 +8,9 @@ import qualified Data.Text as T data EmailVisibility = EmailVisibilityPrivate | EmailVisibilityPublic - deriving (Show, Data, Enum, Bounded, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Enum, Bounded, Eq, Ord, Generic) -instance NFData EmailVisibility where rnf = genericRnf +instance NFData EmailVisibility instance Binary EmailVisibility instance FromJSON EmailVisibility where @@ -24,9 +24,9 @@ data Email = Email , emailVerified :: !Bool , emailPrimary :: !Bool , emailVisibility :: !(Maybe EmailVisibility) - } deriving (Show, Data, Typeable, Eq, Ord, Generic) + } deriving (Show, Data, Eq, Ord, Generic) -instance NFData Email where rnf = genericRnf +instance NFData Email instance Binary Email instance FromJSON Email where diff --git a/src/GitHub/Data/Enterprise/Organizations.hs b/src/GitHub/Data/Enterprise/Organizations.hs index 9c48f386..02c99453 100644 --- a/src/GitHub/Data/Enterprise/Organizations.hs +++ b/src/GitHub/Data/Enterprise/Organizations.hs @@ -11,26 +11,26 @@ data CreateOrganization = CreateOrganization , createOrganizationAdmin :: !(Name User) , createOrganizationProfileName :: !(Maybe Text) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData CreateOrganization where rnf = genericRnf +instance NFData CreateOrganization instance Binary CreateOrganization data RenameOrganization = RenameOrganization { renameOrganizationLogin :: !(Name Organization) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RenameOrganization where rnf = genericRnf +instance NFData RenameOrganization instance Binary RenameOrganization data RenameOrganizationResponse = RenameOrganizationResponse { renameOrganizationResponseMessage :: !Text , renameOrganizationResponseUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RenameOrganizationResponse where rnf = genericRnf +instance NFData RenameOrganizationResponse instance Binary RenameOrganizationResponse -- JSON Instances diff --git a/src/GitHub/Data/Events.hs b/src/GitHub/Data/Events.hs index db0e881a..4025aae7 100644 --- a/src/GitHub/Data/Events.hs +++ b/src/GitHub/Data/Events.hs @@ -16,9 +16,9 @@ data Event = Event , eventCreatedAt :: !UTCTime , eventPublic :: !Bool } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Event where rnf = genericRnf +instance NFData Event instance Binary Event instance FromJSON Event where diff --git a/src/GitHub/Data/Gists.hs b/src/GitHub/Data/Gists.hs index ab2e846d..983b7a1d 100644 --- a/src/GitHub/Data/Gists.hs +++ b/src/GitHub/Data/Gists.hs @@ -21,9 +21,9 @@ data Gist = Gist , gistId :: !(Name Gist) , gistFiles :: !(HashMap Text GistFile) , gistGitPullUrl :: !URL - } deriving (Show, Data, Typeable, Eq, Generic) + } deriving (Show, Data, Eq, Generic) -instance NFData Gist where rnf = genericRnf +instance NFData Gist instance Binary Gist instance FromJSON Gist where @@ -49,9 +49,9 @@ data GistFile = GistFile , gistFileFilename :: !Text , gistFileContent :: !(Maybe Text) } - deriving (Show, Data, Typeable, Eq, Generic) + deriving (Show, Data, Eq, Generic) -instance NFData GistFile where rnf = genericRnf +instance NFData GistFile instance Binary GistFile instance FromJSON GistFile where @@ -71,9 +71,9 @@ data GistComment = GistComment , gistCommentUpdatedAt :: !UTCTime , gistCommentId :: !(Id GistComment) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData GistComment where rnf = genericRnf +instance NFData GistComment instance Binary GistComment instance FromJSON GistComment where @@ -89,9 +89,9 @@ data NewGist = NewGist { newGistDescription :: !(Maybe Text) , newGistFiles :: !(HashMap Text NewGistFile) , newGistPublic :: !(Maybe Bool) - } deriving (Show, Data, Typeable, Eq, Generic) + } deriving (Show, Data, Eq, Generic) -instance NFData NewGist where rnf = genericRnf +instance NFData NewGist instance Binary NewGist instance ToJSON NewGist where @@ -109,9 +109,9 @@ instance ToJSON NewGist where data NewGistFile = NewGistFile { newGistFileContent :: !Text - } deriving (Show, Data, Typeable, Eq, Generic) + } deriving (Show, Data, Eq, Generic) -instance NFData NewGistFile where rnf = genericRnf +instance NFData NewGistFile instance Binary NewGistFile instance ToJSON NewGistFile where diff --git a/src/GitHub/Data/GitData.hs b/src/GitHub/Data/GitData.hs index 95b47533..41158632 100644 --- a/src/GitHub/Data/GitData.hs +++ b/src/GitHub/Data/GitData.hs @@ -15,16 +15,16 @@ data CommitQueryOption | CommitQueryAuthor !Text | CommitQuerySince !UTCTime | CommitQueryUntil !UTCTime - deriving (Show, Eq, Ord, Generic, Typeable, Data) + deriving (Show, Eq, Ord, Generic, Data) data Stats = Stats { statsAdditions :: !Int , statsTotal :: !Int , statsDeletions :: !Int } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Stats where rnf = genericRnf +instance NFData Stats instance Binary Stats data Commit = Commit @@ -37,9 +37,9 @@ data Commit = Commit , commitFiles :: !(Vector File) , commitStats :: !(Maybe Stats) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Commit where rnf = genericRnf +instance NFData Commit instance Binary Commit data Tree = Tree @@ -47,9 +47,9 @@ data Tree = Tree , treeUrl :: !URL , treeGitTrees :: !(Vector GitTree) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Tree where rnf = genericRnf +instance NFData Tree instance Binary Tree data GitTree = GitTree @@ -61,9 +61,9 @@ data GitTree = GitTree , gitTreePath :: !Text , gitTreeMode :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData GitTree where rnf = genericRnf +instance NFData GitTree instance Binary GitTree data GitCommit = GitCommit @@ -75,9 +75,9 @@ data GitCommit = GitCommit , gitCommitSha :: !(Maybe (Name GitCommit)) , gitCommitParents :: !(Vector Tree) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData GitCommit where rnf = genericRnf +instance NFData GitCommit instance Binary GitCommit data Blob = Blob @@ -87,9 +87,9 @@ data Blob = Blob , blobSha :: !(Name Blob) , blobSize :: !Int } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Blob where rnf = genericRnf +instance NFData Blob instance Binary Blob data Tag = Tag @@ -98,26 +98,26 @@ data Tag = Tag , tagTarballUrl :: !URL , tagCommit :: !BranchCommit } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Tag where rnf = genericRnf +instance NFData Tag instance Binary Tag data Branch = Branch { branchName :: !Text , branchCommit :: !BranchCommit } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Branch where rnf = genericRnf +instance NFData Branch data BranchCommit = BranchCommit { branchCommitSha :: !Text , branchCommitUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData BranchCommit where rnf = genericRnf +instance NFData BranchCommit instance Binary BranchCommit data Diff = Diff @@ -134,18 +134,18 @@ data Diff = Diff , diffDiffUrl :: !URL , diffPermalinkUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Diff where rnf = genericRnf +instance NFData Diff instance Binary Diff data NewGitReference = NewGitReference { newGitReferenceRef :: !Text , newGitReferenceSha :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewGitReference where rnf = genericRnf +instance NFData NewGitReference instance Binary NewGitReference data GitReference = GitReference @@ -153,9 +153,9 @@ data GitReference = GitReference , gitReferenceUrl :: !URL , gitReferenceRef :: !(Name GitReference) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData GitReference where rnf = genericRnf +instance NFData GitReference instance Binary GitReference data GitObject = GitObject @@ -163,9 +163,9 @@ data GitObject = GitObject , gitObjectSha :: !Text , gitObjectUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData GitObject where rnf = genericRnf +instance NFData GitObject instance Binary GitObject data GitUser = GitUser @@ -173,9 +173,9 @@ data GitUser = GitUser , gitUserEmail :: !Text , gitUserDate :: !UTCTime } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData GitUser where rnf = genericRnf +instance NFData GitUser instance Binary GitUser data File = File @@ -189,9 +189,9 @@ data File = File , fileFilename :: !Text , fileDeletions :: !Int } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData File where rnf = genericRnf +instance NFData File instance Binary File -- JSON instances diff --git a/src/GitHub/Data/Id.hs b/src/GitHub/Data/Id.hs index ddbc9e25..6c18c2e2 100644 --- a/src/GitHub/Data/Id.hs +++ b/src/GitHub/Data/Id.hs @@ -9,7 +9,7 @@ import Prelude () -- | Numeric identifier. newtype Id entity = Id Int - deriving (Eq, Ord, Show, Generic, Typeable, Data) + deriving (Eq, Ord, Show, Generic, Data) -- | Smart constructor for 'Id'. mkId :: proxy entity -> Int -> Id entity diff --git a/src/GitHub/Data/Invitation.hs b/src/GitHub/Data/Invitation.hs index 1ea656f9..5818a296 100644 --- a/src/GitHub/Data/Invitation.hs +++ b/src/GitHub/Data/Invitation.hs @@ -19,9 +19,9 @@ data Invitation = Invitation , invitationCreatedAt :: !UTCTime , inviter :: !SimpleUser } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Invitation where rnf = genericRnf +instance NFData Invitation instance Binary Invitation instance FromJSON Invitation where @@ -41,9 +41,9 @@ data InvitationRole | InvitationRoleHiringManager | InvitationRoleReinstate deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) -instance NFData InvitationRole where rnf = genericRnf +instance NFData InvitationRole instance Binary InvitationRole instance FromJSON InvitationRole where @@ -65,9 +65,9 @@ data RepoInvitation = RepoInvitation , repoInvitationPermission :: !Text , repoInvitationHtmlUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RepoInvitation where rnf = genericRnf +instance NFData RepoInvitation instance Binary RepoInvitation instance FromJSON RepoInvitation where diff --git a/src/GitHub/Data/Issues.hs b/src/GitHub/Data/Issues.hs index 191b342e..2f815c0d 100644 --- a/src/GitHub/Data/Issues.hs +++ b/src/GitHub/Data/Issues.hs @@ -33,9 +33,9 @@ data Issue = Issue , issueMilestone :: !(Maybe Milestone) , issueStateReason :: !(Maybe IssueStateReason) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Issue where rnf = genericRnf +instance NFData Issue instance Binary Issue data NewIssue = NewIssue @@ -45,9 +45,9 @@ data NewIssue = NewIssue , newIssueMilestone :: !(Maybe (Id Milestone)) , newIssueLabels :: !(Maybe (Vector (Name IssueLabel))) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewIssue where rnf = genericRnf +instance NFData NewIssue instance Binary NewIssue data EditIssue = EditIssue @@ -58,9 +58,9 @@ data EditIssue = EditIssue , editIssueMilestone :: !(Maybe (Id Milestone)) , editIssueLabels :: !(Maybe (Vector (Name IssueLabel))) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData EditIssue where rnf = genericRnf +instance NFData EditIssue instance Binary EditIssue data IssueComment = IssueComment @@ -72,9 +72,9 @@ data IssueComment = IssueComment , issueCommentBody :: !Text , issueCommentId :: !Int } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData IssueComment where rnf = genericRnf +instance NFData IssueComment instance Binary IssueComment -- | See @@ -106,9 +106,9 @@ data EventType | MovedColumnsInProject -- ^ The issue was moved between columns in a project board. | RemovedFromProject -- ^ The issue was removed from a project board. | ConvertedNoteToIssue -- ^ The issue was created by converting a note in a project board to an issue. - deriving (Show, Data, Enum, Bounded, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Enum, Bounded, Eq, Ord, Generic) -instance NFData EventType where rnf = genericRnf +instance NFData EventType instance Binary EventType -- | Issue event @@ -122,9 +122,9 @@ data IssueEvent = IssueEvent , issueEventIssue :: !(Maybe Issue) , issueEventLabel :: !(Maybe IssueLabel) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData IssueEvent where rnf = genericRnf +instance NFData IssueEvent instance Binary IssueEvent instance FromJSON IssueEvent where diff --git a/src/GitHub/Data/Milestone.hs b/src/GitHub/Data/Milestone.hs index 385678d1..789b2324 100644 --- a/src/GitHub/Data/Milestone.hs +++ b/src/GitHub/Data/Milestone.hs @@ -18,9 +18,9 @@ data Milestone = Milestone , milestoneCreatedAt :: !UTCTime , milestoneState :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Milestone where rnf = genericRnf +instance NFData Milestone instance Binary Milestone instance FromJSON Milestone where @@ -42,9 +42,9 @@ data NewMilestone = NewMilestone , newMilestoneDescription :: !(Maybe Text) , newMilestoneDueOn :: !(Maybe UTCTime) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewMilestone where rnf = genericRnf +instance NFData NewMilestone instance Binary NewMilestone @@ -65,9 +65,9 @@ data UpdateMilestone = UpdateMilestone , updateMilestoneDescription :: !(Maybe Text) , updateMilestoneDueOn :: !(Maybe UTCTime) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData UpdateMilestone where rnf = genericRnf +instance NFData UpdateMilestone instance Binary UpdateMilestone diff --git a/src/GitHub/Data/Name.hs b/src/GitHub/Data/Name.hs index 99554287..a9ecf8e5 100644 --- a/src/GitHub/Data/Name.hs +++ b/src/GitHub/Data/Name.hs @@ -11,7 +11,7 @@ import Data.Aeson.Types (FromJSONKey (..), ToJSONKey (..), fromJSONKeyCoerce, toJSONKeyText) newtype Name entity = N Text - deriving (Eq, Ord, Show, Generic, Typeable, Data) + deriving (Eq, Ord, Show, Generic, Data) -- | Smart constructor for 'Name' mkName :: proxy entity -> Text -> Name entity diff --git a/src/GitHub/Data/Options.hs b/src/GitHub/Data/Options.hs index bf03c617..da137f0f 100644 --- a/src/GitHub/Data/Options.hs +++ b/src/GitHub/Data/Options.hs @@ -104,7 +104,7 @@ data IssueState = StateOpen | StateClosed deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) instance ToJSON IssueState where toJSON StateOpen = String "open" @@ -116,7 +116,7 @@ instance FromJSON IssueState where "closed" -> pure StateClosed _ -> fail $ "Unknown IssueState: " <> T.unpack t -instance NFData IssueState where rnf = genericRnf +instance NFData IssueState instance Binary IssueState -- | 'GitHub.Data.Issues.Issue' state reason @@ -126,7 +126,7 @@ data IssueStateReason | StateReasonNotPlanned | StateReasonReopened deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) instance ToJSON IssueStateReason where toJSON = String . \case @@ -143,7 +143,7 @@ instance FromJSON IssueStateReason where "reopened" -> pure StateReasonReopened _ -> fail $ "Unknown IssueStateReason: " <> T.unpack t -instance NFData IssueStateReason where rnf = genericRnf +instance NFData IssueStateReason instance Binary IssueStateReason -- | 'GitHub.Data.PullRequests.PullRequest' mergeable_state @@ -156,7 +156,7 @@ data MergeableState | StateBehind | StateDraft deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) instance ToJSON MergeableState where toJSON StateUnknown = String "unknown" @@ -178,16 +178,16 @@ instance FromJSON MergeableState where "draft" -> pure StateDraft _ -> fail $ "Unknown MergeableState: " <> T.unpack t -instance NFData MergeableState where rnf = genericRnf +instance NFData MergeableState instance Binary MergeableState data SortDirection = SortAscending | SortDescending deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) -instance NFData SortDirection where rnf = genericRnf +instance NFData SortDirection instance Binary SortDirection -- PR @@ -198,9 +198,9 @@ data SortPR | SortPRPopularity | SortPRLongRunning deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) -instance NFData SortPR where rnf = genericRnf +instance NFData SortPR instance Binary SortPR -- Issue @@ -211,9 +211,9 @@ data IssueFilter | IssueFilterSubscribed | IssueFilterAll deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) -instance NFData IssueFilter where rnf = genericRnf +instance NFData IssueFilter instance Binary IssueFilter data SortIssue @@ -221,9 +221,9 @@ data SortIssue | SortIssueUpdated | SortIssueComments deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) -instance NFData SortIssue where rnf = genericRnf +instance NFData SortIssue instance Binary SortIssue data FilterBy a @@ -234,7 +234,7 @@ data FilterBy a -- ^ e.g. for milestones "any" means "any milestone". -- I.e. won't show issues without mileston specified deriving - (Eq, Ord, Show, Generic, Typeable, Data) + (Eq, Ord, Show, Generic, Data) -- Actions cache @@ -243,9 +243,9 @@ data SortCache | SortCacheLastAccessedAt | SortCacheSizeInBytes deriving - (Eq, Ord, Show, Enum, Bounded, Generic, Typeable, Data) + (Eq, Ord, Show, Enum, Bounded, Generic, Data) -instance NFData SortCache where rnf = genericRnf +instance NFData SortCache instance Binary SortCache ------------------------------------------------------------------------------- @@ -334,7 +334,7 @@ data PullRequestOptions = PullRequestOptions , pullRequestOptionsDirection :: !SortDirection } deriving - (Eq, Ord, Show, Generic, Typeable, Data) + (Eq, Ord, Show, Generic, Data) defaultPullRequestOptions :: PullRequestOptions defaultPullRequestOptions = PullRequestOptions @@ -429,7 +429,7 @@ data IssueOptions = IssueOptions , issueOptionsSince :: !(Maybe UTCTime) } deriving - (Eq, Ord, Show, Generic, Typeable, Data) + (Eq, Ord, Show, Generic, Data) defaultIssueOptions :: IssueOptions defaultIssueOptions = IssueOptions @@ -575,7 +575,7 @@ data IssueRepoOptions = IssueRepoOptions , issueRepoOptionsSince :: !(Maybe UTCTime) -- ^ 'HasSince' } deriving - (Eq, Ord, Show, Generic, Typeable, Data) + (Eq, Ord, Show, Generic, Data) defaultIssueRepoOptions :: IssueRepoOptions defaultIssueRepoOptions = IssueRepoOptions @@ -714,7 +714,7 @@ data ArtifactOptions = ArtifactOptions { artifactOptionsName :: !(Maybe Text) } deriving - (Eq, Ord, Show, Generic, Typeable, Data) + (Eq, Ord, Show, Generic, Data) defaultArtifactOptions :: ArtifactOptions defaultArtifactOptions = ArtifactOptions @@ -763,7 +763,7 @@ data CacheOptions = CacheOptions , cacheOptionsDirection :: !(Maybe SortDirection) } deriving - (Eq, Ord, Show, Generic, Typeable, Data) + (Eq, Ord, Show, Generic, Data) defaultCacheOptions :: CacheOptions defaultCacheOptions = CacheOptions @@ -863,7 +863,7 @@ data WorkflowRunOptions = WorkflowRunOptions , workflowRunOptionsHeadSha :: !(Maybe Text) } deriving - (Eq, Ord, Show, Generic, Typeable, Data) + (Eq, Ord, Show, Generic, Data) defaultWorkflowRunOptions :: WorkflowRunOptions defaultWorkflowRunOptions = WorkflowRunOptions diff --git a/src/GitHub/Data/PublicSSHKeys.hs b/src/GitHub/Data/PublicSSHKeys.hs index 125cd4aa..a7bf18f9 100644 --- a/src/GitHub/Data/PublicSSHKeys.hs +++ b/src/GitHub/Data/PublicSSHKeys.hs @@ -14,7 +14,7 @@ data PublicSSHKeyBasic = PublicSSHKeyBasic { basicPublicSSHKeyId :: !(Id PublicSSHKey) , basicPublicSSHKeyKey :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance FromJSON PublicSSHKeyBasic where parseJSON = withObject "PublicSSHKeyBasic" $ \o -> PublicSSHKeyBasic @@ -30,7 +30,7 @@ data PublicSSHKey = PublicSSHKey , publicSSHKeyCreatedAt :: !(Maybe UTCTime) , publicSSHKeyReadOnly :: !Bool } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance FromJSON PublicSSHKey where parseJSON = withObject "PublicSSHKey" $ \o -> PublicSSHKey @@ -46,7 +46,7 @@ data NewPublicSSHKey = NewPublicSSHKey { newPublicSSHKeyKey :: !Text , newPublicSSHKeyTitle :: !Text } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance ToJSON NewPublicSSHKey where toJSON (NewPublicSSHKey key title) = object diff --git a/src/GitHub/Data/PullRequests.hs b/src/GitHub/Data/PullRequests.hs index 79054b6a..74370960 100644 --- a/src/GitHub/Data/PullRequests.hs +++ b/src/GitHub/Data/PullRequests.hs @@ -43,9 +43,9 @@ data SimplePullRequest = SimplePullRequest , simplePullRequestTitle :: !Text , simplePullRequestId :: !(Id PullRequest) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData SimplePullRequest where rnf = genericRnf +instance NFData SimplePullRequest instance Binary SimplePullRequest data PullRequest = PullRequest @@ -81,9 +81,9 @@ data PullRequest = PullRequest , pullRequestMergeable :: !(Maybe Bool) , pullRequestMergeableState :: !MergeableState } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData PullRequest where rnf = genericRnf +instance NFData PullRequest instance Binary PullRequest data EditPullRequest = EditPullRequest @@ -96,7 +96,7 @@ data EditPullRequest = EditPullRequest } deriving (Show, Generic) -instance NFData EditPullRequest where rnf = genericRnf +instance NFData EditPullRequest instance Binary EditPullRequest data CreatePullRequest @@ -113,7 +113,7 @@ data CreatePullRequest } deriving (Show, Generic) -instance NFData CreatePullRequest where rnf = genericRnf +instance NFData CreatePullRequest instance Binary CreatePullRequest data PullRequestLinks = PullRequestLinks @@ -122,9 +122,9 @@ data PullRequestLinks = PullRequestLinks , pullRequestLinksHtml :: !URL , pullRequestLinksSelf :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData PullRequestLinks where rnf = genericRnf +instance NFData PullRequestLinks instance Binary PullRequestLinks data PullRequestCommit = PullRequestCommit @@ -134,9 +134,9 @@ data PullRequestCommit = PullRequestCommit , pullRequestCommitUser :: !SimpleUser , pullRequestCommitRepo :: !(Maybe Repo) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData PullRequestCommit where rnf = genericRnf +instance NFData PullRequestCommit instance Binary PullRequestCommit data PullRequestEvent = PullRequestEvent @@ -146,9 +146,9 @@ data PullRequestEvent = PullRequestEvent , pullRequestRepository :: !Repo , pullRequestSender :: !SimpleUser } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData PullRequestEvent where rnf = genericRnf +instance NFData PullRequestEvent instance Binary PullRequestEvent data PullRequestEventType @@ -163,9 +163,9 @@ data PullRequestEventType | PullRequestReviewRequested | PullRequestReviewRequestRemoved | PullRequestEdited - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData PullRequestEventType where rnf = genericRnf +instance NFData PullRequestEventType instance Binary PullRequestEventType data PullRequestReference = PullRequestReference @@ -173,9 +173,9 @@ data PullRequestReference = PullRequestReference , pullRequestReferencePatchUrl :: !(Maybe URL) , pullRequestReferenceDiffUrl :: !(Maybe URL) } - deriving (Eq, Ord, Show, Generic, Typeable, Data) + deriving (Eq, Ord, Show, Generic, Data) -instance NFData PullRequestReference where rnf = genericRnf +instance NFData PullRequestReference instance Binary PullRequestReference @@ -316,4 +316,4 @@ data MergeResult = MergeSuccessful | MergeCannotPerform | MergeConflict - deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Generic) diff --git a/src/GitHub/Data/RateLimit.hs b/src/GitHub/Data/RateLimit.hs index 4e0b549c..743a096e 100644 --- a/src/GitHub/Data/RateLimit.hs +++ b/src/GitHub/Data/RateLimit.hs @@ -13,9 +13,9 @@ data Limits = Limits , limitsRemaining :: !Int , limitsReset :: !SystemTime } - deriving (Show, {- Data, -} Typeable, Eq, Ord, Generic) + deriving (Show, Eq, Ord, Generic) -instance NFData Limits where rnf = genericRnf +instance NFData Limits instance Binary Limits instance FromJSON Limits where @@ -29,9 +29,9 @@ data RateLimit = RateLimit , rateLimitSearch :: Limits , rateLimitGraphQL :: Limits } - deriving (Show, {- Data, -} Typeable, Eq, Ord, Generic) + deriving (Show, Eq, Ord, Generic) -instance NFData RateLimit where rnf = genericRnf +instance NFData RateLimit instance Binary RateLimit instance FromJSON RateLimit where diff --git a/src/GitHub/Data/Reactions.hs b/src/GitHub/Data/Reactions.hs index f5fc3ead..574fda00 100644 --- a/src/GitHub/Data/Reactions.hs +++ b/src/GitHub/Data/Reactions.hs @@ -13,17 +13,17 @@ data Reaction = Reaction , reactionContent :: !ReactionContent , reactionCreatedAt :: !UTCTime } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Reaction where rnf = genericRnf +instance NFData Reaction instance Binary Reaction data NewReaction = NewReaction { newReactionContent :: !ReactionContent } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewReaction where rnf = genericRnf +instance NFData NewReaction instance Binary NewReaction -- | @@ -37,9 +37,9 @@ data ReactionContent | Hooray | Rocket | Eyes - deriving (Show, Data, Typeable, Eq, Ord, Enum, Bounded, Generic) + deriving (Show, Data, Eq, Ord, Enum, Bounded, Generic) -instance NFData ReactionContent where rnf = genericRnf +instance NFData ReactionContent instance Binary ReactionContent -- JSON instances diff --git a/src/GitHub/Data/Releases.hs b/src/GitHub/Data/Releases.hs index 582b524c..7f87b825 100644 --- a/src/GitHub/Data/Releases.hs +++ b/src/GitHub/Data/Releases.hs @@ -25,7 +25,7 @@ data Release = Release , releaseAuthor :: !SimpleUser , releaseAssets :: !(Vector ReleaseAsset) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance FromJSON Release where parseJSON = withObject "Event" $ \o -> Release @@ -47,7 +47,7 @@ instance FromJSON Release where <*> o .: "author" <*> o .: "assets" -instance NFData Release where rnf = genericRnf +instance NFData Release instance Binary Release data ReleaseAsset = ReleaseAsset @@ -64,7 +64,7 @@ data ReleaseAsset = ReleaseAsset , releaseAssetUpdatedAt :: !UTCTime , releaseAssetUploader :: !SimpleUser } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance FromJSON ReleaseAsset where parseJSON = withObject "Event" $ \o -> ReleaseAsset @@ -81,5 +81,5 @@ instance FromJSON ReleaseAsset where <*> o .: "updated_at" <*> o .: "uploader" -instance NFData ReleaseAsset where rnf = genericRnf +instance NFData ReleaseAsset instance Binary ReleaseAsset diff --git a/src/GitHub/Data/Repos.hs b/src/GitHub/Data/Repos.hs index 456775b6..6dce3919 100644 --- a/src/GitHub/Data/Repos.hs +++ b/src/GitHub/Data/Repos.hs @@ -53,9 +53,9 @@ data Repo = Repo , repoUpdatedAt :: !(Maybe UTCTime) , repoPermissions :: !(Maybe RepoPermissions) -- ^ Repository permissions as they relate to the authenticated user. } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Repo where rnf = genericRnf +instance NFData Repo instance Binary Repo data CodeSearchRepo = CodeSearchRepo @@ -88,9 +88,9 @@ data CodeSearchRepo = CodeSearchRepo , codeSearchRepoUpdatedAt :: !(Maybe UTCTime) , codeSearchRepoPermissions :: !(Maybe RepoPermissions) -- ^ Repository permissions as they relate to the authenticated user. } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData CodeSearchRepo where rnf = genericRnf +instance NFData CodeSearchRepo instance Binary CodeSearchRepo -- | Repository permissions, as they relate to the authenticated user. @@ -101,18 +101,18 @@ data RepoPermissions = RepoPermissions , repoPermissionPush :: !Bool , repoPermissionPull :: !Bool } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RepoPermissions where rnf = genericRnf +instance NFData RepoPermissions instance Binary RepoPermissions data RepoRef = RepoRef { repoRefOwner :: !SimpleOwner , repoRefRepo :: !(Name Repo) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RepoRef where rnf = genericRnf +instance NFData RepoRef instance Binary RepoRef data NewRepo = NewRepo @@ -129,9 +129,9 @@ data NewRepo = NewRepo , newRepoAllowSquashMerge :: !(Maybe Bool) , newRepoAllowMergeCommit :: !(Maybe Bool) , newRepoAllowRebaseMerge :: !(Maybe Bool) - } deriving (Eq, Ord, Show, Data, Typeable, Generic) + } deriving (Eq, Ord, Show, Data, Generic) -instance NFData NewRepo where rnf = genericRnf +instance NFData NewRepo instance Binary NewRepo newRepo :: Name Repo -> NewRepo @@ -151,9 +151,9 @@ data EditRepo = EditRepo , editAllowRebaseMerge :: !(Maybe Bool) , editArchived :: !(Maybe Bool) } - deriving (Eq, Ord, Show, Data, Typeable, Generic) + deriving (Eq, Ord, Show, Data, Generic) -instance NFData EditRepo where rnf = genericRnf +instance NFData EditRepo instance Binary EditRepo -- | Filter the list of the user's repos using any of these constructors. @@ -163,19 +163,19 @@ data RepoPublicity | RepoPublicityPublic -- ^ Only public repos. | RepoPublicityPrivate -- ^ Only private repos. | RepoPublicityMember -- ^ Only repos to which the user is a member but not an owner. - deriving (Show, Eq, Ord, Enum, Bounded, Typeable, Data, Generic) + deriving (Show, Eq, Ord, Enum, Bounded, Data, Generic) -- | The value is the number of bytes of code written in that language. type Languages = HM.HashMap Language Int -- | A programming language. newtype Language = Language Text - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) getLanguage :: Language -> Text getLanguage (Language l) = l -instance NFData Language where rnf = genericRnf +instance NFData Language instance Binary Language instance Hashable Language where hashWithSalt salt (Language l) = hashWithSalt salt l @@ -188,9 +188,9 @@ data Contributor = KnownContributor !Int !URL !(Name User) !URL !(Id User) !Text -- | An unknown Github user with their number of contributions and recorded name. | AnonymousContributor !Int !Text - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Contributor where rnf = genericRnf +instance NFData Contributor instance Binary Contributor contributorToSimpleUser :: Contributor -> Maybe SimpleUser @@ -205,18 +205,18 @@ data CollaboratorPermission | CollaboratorPermissionWrite | CollaboratorPermissionRead | CollaboratorPermissionNone - deriving (Show, Data, Enum, Bounded, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Enum, Bounded, Eq, Ord, Generic) -instance NFData CollaboratorPermission where rnf = genericRnf +instance NFData CollaboratorPermission instance Binary CollaboratorPermission -- | A collaborator and its permission on a repository. -- See data CollaboratorWithPermission = CollaboratorWithPermission SimpleUser CollaboratorPermission - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData CollaboratorWithPermission where rnf = genericRnf +instance NFData CollaboratorWithPermission instance Binary CollaboratorWithPermission -- JSON instances @@ -381,7 +381,7 @@ instance FromJSONKey Language where data ArchiveFormat = ArchiveFormatTarball -- ^ ".tar.gz" format | ArchiveFormatZipball -- ^ ".zip" format - deriving (Show, Eq, Ord, Enum, Bounded, Typeable, Data, Generic) + deriving (Show, Eq, Ord, Enum, Bounded, Data, Generic) instance IsPathPart ArchiveFormat where toPathPart af = case af of diff --git a/src/GitHub/Data/Request.hs b/src/GitHub/Data/Request.hs index c8138c1a..07ac89dd 100644 --- a/src/GitHub/Data/Request.hs +++ b/src/GitHub/Data/Request.hs @@ -61,7 +61,7 @@ data CommandMethod | Patch | Put | Delete - deriving (Eq, Ord, Read, Show, Enum, Bounded, Typeable, Data, Generic) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Generic) instance Hashable CommandMethod @@ -81,7 +81,7 @@ data FetchCount = FetchAtLeast !Word | FetchAll | FetchPage PageParams - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) -- | This instance is there mostly for 'fromInteger'. @@ -100,7 +100,7 @@ instance Num FetchCount where instance Hashable FetchCount instance Binary FetchCount -instance NFData FetchCount where rnf = genericRnf +instance NFData FetchCount ------------------------------------------------------------------------------- -- PageParams @@ -111,11 +111,11 @@ data PageParams = PageParams { pageParamsPerPage :: Maybe Int , pageParamsPage :: Maybe Int } - deriving (Eq, Ord, Read, Show, Generic, Typeable) + deriving (Eq, Ord, Read, Show, Generic) instance Hashable PageParams instance Binary PageParams -instance NFData PageParams where rnf = genericRnf +instance NFData PageParams ------------------------------------------------------------------------------- -- PageLinks @@ -129,9 +129,9 @@ data PageLinks = PageLinks { , pageLinksLast :: Maybe URI , pageLinksFirst :: Maybe URI } - deriving (Eq, Ord, Show, Generic, Typeable) + deriving (Eq, Ord, Show, Generic) -instance NFData PageLinks where rnf = genericRnf +instance NFData PageLinks ------------------------------------------------------------------------------- -- MediaType @@ -148,7 +148,7 @@ data MediaType a | MtStatus -- ^ Parse status | MtUnit -- ^ Always succeeds | MtPreview a -- ^ Some other (preview) type; this is an extension point. - deriving (Eq, Ord, Read, Show, Typeable, Data, Generic) + deriving (Eq, Ord, Read, Show, Data, Generic) ------------------------------------------------------------------------------ -- RW @@ -160,7 +160,7 @@ data RW = RO -- ^ /Read-only/, doesn't necessarily requires authentication | RA -- ^ /Read authenticated/ | RW -- ^ /Read-write/, requires authentication - deriving (Eq, Ord, Read, Show, Enum, Bounded, Typeable, Data, Generic) + deriving (Eq, Ord, Read, Show, Enum, Bounded, Data, Generic) {- data SRO (rw :: RW) where @@ -194,7 +194,6 @@ data GenRequest (mt :: MediaType *) (rw :: RW) a where -> Paths -- ^ path -> LBS.ByteString -- ^ body -> GenRequest mt 'RW a - deriving (Typeable) -- | Most requests ask for @JSON@. type Request = GenRequest 'MtJSON diff --git a/src/GitHub/Data/Reviews.hs b/src/GitHub/Data/Reviews.hs index b00edb74..c8761e0a 100644 --- a/src/GitHub/Data/Reviews.hs +++ b/src/GitHub/Data/Reviews.hs @@ -16,9 +16,7 @@ data ReviewState | ReviewStateChangesRequested deriving (Show, Enum, Bounded, Eq, Ord, Generic) -instance NFData ReviewState where - rnf = genericRnf - +instance NFData ReviewState instance Binary ReviewState instance FromJSON ReviewState where @@ -41,9 +39,7 @@ data Review = Review , reviewId :: !(Id Review) } deriving (Show, Generic) -instance NFData Review where - rnf = genericRnf - +instance NFData Review instance Binary Review instance FromJSON Review where @@ -74,9 +70,7 @@ data ReviewComment = ReviewComment , reviewCommentPullRequestUrl :: !URL } deriving (Show, Generic) -instance NFData ReviewComment where - rnf = genericRnf - +instance NFData ReviewComment instance Binary ReviewComment instance FromJSON ReviewComment where diff --git a/src/GitHub/Data/Search.hs b/src/GitHub/Data/Search.hs index b56067b0..a84710d2 100644 --- a/src/GitHub/Data/Search.hs +++ b/src/GitHub/Data/Search.hs @@ -11,11 +11,11 @@ data SearchResult' entities = SearchResult { searchResultTotalCount :: !Int , searchResultResults :: !entities } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) type SearchResult entity = SearchResult' (V.Vector entity) -instance NFData entities => NFData (SearchResult' entities) where rnf = genericRnf +instance NFData entities => NFData (SearchResult' entities) instance Binary entities => Binary (SearchResult' entities) instance (Monoid entities, FromJSON entities) => FromJSON (SearchResult' entities) where @@ -38,9 +38,9 @@ data Code = Code , codeHtmlUrl :: !URL , codeRepo :: !CodeSearchRepo } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Code where rnf = genericRnf +instance NFData Code instance Binary Code instance FromJSON Code where diff --git a/src/GitHub/Data/Statuses.hs b/src/GitHub/Data/Statuses.hs index 09853b26..a2e19219 100644 --- a/src/GitHub/Data/Statuses.hs +++ b/src/GitHub/Data/Statuses.hs @@ -1,7 +1,5 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE OverloadedStrings #-} + module GitHub.Data.Statuses where import GitHub.Data.Definitions @@ -21,9 +19,9 @@ data StatusState | StatusSuccess | StatusError | StatusFailure - deriving (Show, Data, Enum, Bounded, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Enum, Bounded, Eq, Ord, Generic) -instance NFData StatusState where rnf = genericRnf +instance NFData StatusState instance Binary StatusState instance FromJSON StatusState where @@ -52,7 +50,7 @@ data Status = Status , statusContext :: !(Maybe Text) , statusCreator :: !(Maybe SimpleUser) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance FromJSON Status where parseJSON = withObject "Status" $ \o -> Status @@ -73,9 +71,9 @@ data NewStatus = NewStatus , newStatusDescription :: !(Maybe Text) , newStatusContext :: !(Maybe Text) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData NewStatus where rnf = genericRnf +instance NFData NewStatus instance Binary NewStatus instance ToJSON NewStatus where @@ -99,7 +97,7 @@ data CombinedStatus = CombinedStatus , combinedStatusCommitUrl :: !URL , combinedStatusUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance FromJSON CombinedStatus where parseJSON = withObject "CombinedStatus" $ \o -> CombinedStatus diff --git a/src/GitHub/Data/Teams.hs b/src/GitHub/Data/Teams.hs index 622370ae..01b1429c 100644 --- a/src/GitHub/Data/Teams.hs +++ b/src/GitHub/Data/Teams.hs @@ -1,7 +1,4 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} -{-# LANGUAGE OverloadedStrings #-} module GitHub.Data.Teams where @@ -18,26 +15,26 @@ import qualified Data.Text as T data Privacy = PrivacyClosed | PrivacySecret - deriving (Show, Data, Enum, Bounded, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Enum, Bounded, Eq, Ord, Generic) -instance NFData Privacy where rnf = genericRnf +instance NFData Privacy instance Binary Privacy data Permission = PermissionPull | PermissionPush | PermissionAdmin - deriving (Show, Data, Enum, Bounded, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Enum, Bounded, Eq, Ord, Generic) -instance NFData Permission where rnf = genericRnf +instance NFData Permission instance Binary Permission data AddTeamRepoPermission = AddTeamRepoPermission { addTeamRepoPermission :: !Permission } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData AddTeamRepoPermission where rnf = genericRnf +instance NFData AddTeamRepoPermission instance Binary AddTeamRepoPermission data SimpleTeam = SimpleTeam @@ -51,9 +48,9 @@ data SimpleTeam = SimpleTeam , simpleTeamMembersUrl :: !URL , simpleTeamRepositoriesUrl :: !URL } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData SimpleTeam where rnf = genericRnf +instance NFData SimpleTeam instance Binary SimpleTeam data Team = Team @@ -70,9 +67,9 @@ data Team = Team , teamReposCount :: !Int , teamOrganization :: !SimpleOrganization } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData Team where rnf = genericRnf +instance NFData Team instance Binary Team data CreateTeam = CreateTeam @@ -82,9 +79,9 @@ data CreateTeam = CreateTeam , createTeamPrivacy :: !Privacy , createTeamPermission :: !Permission } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData CreateTeam where rnf = genericRnf +instance NFData CreateTeam instance Binary CreateTeam data EditTeam = EditTeam @@ -93,15 +90,15 @@ data EditTeam = EditTeam , editTeamPrivacy :: !(Maybe Privacy) , editTeamPermission :: !(Maybe Permission) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData EditTeam where rnf = genericRnf +instance NFData EditTeam instance Binary EditTeam data Role = RoleMaintainer | RoleMember - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) instance NFData Role instance Binary Role @@ -109,9 +106,9 @@ instance Binary Role data ReqState = StatePending | StateActive - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData ReqState where rnf = genericRnf +instance NFData ReqState instance Binary ReqState data TeamMembership = TeamMembership @@ -119,16 +116,16 @@ data TeamMembership = TeamMembership , teamMembershipRole :: !Role , teamMembershipReqState :: !ReqState } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData TeamMembership where rnf = genericRnf +instance NFData TeamMembership instance Binary TeamMembership data CreateTeamMembership = CreateTeamMembership { createTeamMembershipRole :: !Role -} deriving (Show, Data, Typeable, Eq, Ord, Generic) +} deriving (Show, Data, Eq, Ord, Generic) -instance NFData CreateTeamMembership where rnf = genericRnf +instance NFData CreateTeamMembership instance Binary CreateTeamMembership -- JSON Instances @@ -254,4 +251,4 @@ data TeamMemberRole = TeamMemberRoleAll -- ^ all members of the team. | TeamMemberRoleMaintainer -- ^ team maintainers | TeamMemberRoleMember -- ^ normal members of the team. - deriving (Show, Eq, Ord, Enum, Bounded, Typeable, Data, Generic) + deriving (Show, Eq, Ord, Enum, Bounded, Data, Generic) diff --git a/src/GitHub/Data/URL.hs b/src/GitHub/Data/URL.hs index d98703ae..69ddde70 100644 --- a/src/GitHub/Data/URL.hs +++ b/src/GitHub/Data/URL.hs @@ -10,12 +10,12 @@ import Prelude () -- -- /N.B./ syntactical validity is not verified. newtype URL = URL Text - deriving (Eq, Ord, Show, Generic, Typeable, Data) + deriving (Eq, Ord, Show, Generic, Data) getUrl :: URL -> Text getUrl (URL url) = url -instance NFData URL where rnf = genericRnf +instance NFData URL instance Binary URL instance ToJSON URL where diff --git a/src/GitHub/Data/Webhooks.hs b/src/GitHub/Data/Webhooks.hs index 143d8006..7d2bac40 100644 --- a/src/GitHub/Data/Webhooks.hs +++ b/src/GitHub/Data/Webhooks.hs @@ -20,9 +20,9 @@ data RepoWebhook = RepoWebhook , repoWebhookUpdatedAt :: !UTCTime , repoWebhookCreatedAt :: !UTCTime } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RepoWebhook where rnf = genericRnf +instance NFData RepoWebhook instance Binary RepoWebhook -- | See . @@ -85,9 +85,9 @@ data RepoWebhookEvent | WebhookWatchEvent | WebhookWorkflowDispatch | WebhookWorkflowRun - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RepoWebhookEvent where rnf = genericRnf +instance NFData RepoWebhookEvent instance Binary RepoWebhookEvent data RepoWebhookResponse = RepoWebhookResponse @@ -95,9 +95,9 @@ data RepoWebhookResponse = RepoWebhookResponse , repoWebhookResponseStatus :: !(Maybe Text) , repoWebhookResponseMessage :: !(Maybe Text) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData RepoWebhookResponse where rnf = genericRnf +instance NFData RepoWebhookResponse instance Binary RepoWebhookResponse data PingEvent = PingEvent @@ -105,9 +105,9 @@ data PingEvent = PingEvent , pingEventHook :: !RepoWebhook , pingEventHookId :: !(Id RepoWebhook) } - deriving (Show, Data, Typeable, Eq, Ord, Generic) + deriving (Show, Data, Eq, Ord, Generic) -instance NFData PingEvent where rnf = genericRnf +instance NFData PingEvent instance Binary PingEvent data NewRepoWebhook = NewRepoWebhook @@ -116,9 +116,9 @@ data NewRepoWebhook = NewRepoWebhook , newRepoWebhookEvents :: !(Maybe (Vector RepoWebhookEvent)) , newRepoWebhookActive :: !(Maybe Bool) } - deriving (Eq, Ord, Show, Typeable, Data, Generic) + deriving (Eq, Ord, Show, Data, Generic) -instance NFData NewRepoWebhook where rnf = genericRnf +instance NFData NewRepoWebhook instance Binary NewRepoWebhook data EditRepoWebhook = EditRepoWebhook @@ -128,9 +128,9 @@ data EditRepoWebhook = EditRepoWebhook , editRepoWebhookRemoveEvents :: !(Maybe (Vector RepoWebhookEvent)) , editRepoWebhookActive :: !(Maybe Bool) } - deriving (Eq, Ord, Show, Typeable, Data, Generic) + deriving (Eq, Ord, Show, Data, Generic) -instance NFData EditRepoWebhook where rnf = genericRnf +instance NFData EditRepoWebhook instance Binary EditRepoWebhook -- JSON instances diff --git a/src/GitHub/Internal/Prelude.hs b/src/GitHub/Internal/Prelude.hs index d6efaf39..a001da65 100644 --- a/src/GitHub/Internal/Prelude.hs +++ b/src/GitHub/Internal/Prelude.hs @@ -7,14 +7,13 @@ module GitHub.Internal.Prelude ( module X ) where import Control.Applicative as X ((<|>)) import Control.DeepSeq as X (NFData (..)) -import Control.DeepSeq.Generics as X (genericRnf) import Data.Aeson as X (FromJSON (..), Object, ToJSON (..), Value (..), encode, object, withObject, withText, (.!=), (.:), (.:?), (.=)) import Data.Aeson.Types as X (emptyObject, typeMismatch) import Data.Binary as X (Binary) import Data.Binary.Instances as X () -import Data.Data as X (Data, Typeable) +import Data.Data as X (Data) import Data.Foldable as X (toList) import Data.Hashable as X (Hashable (..)) import Data.HashMap.Strict as X (HashMap)