Skip to content

Commit 76351c2

Browse files
committed
Drop support for GHC 8.0 and below
1 parent ee8b286 commit 76351c2

File tree

12 files changed

+16
-55
lines changed

12 files changed

+16
-55
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## Changes for 0.29.1
2+
3+
- Drop support for GHC 8.0 and below.
4+
- Drop dependency `time-compat`.
5+
6+
Tested with GHC 8.2 - 9.10.1.
7+
18
## Changes for 0.29
29

310
_2023-06-24, Andreas Abel, Midsommar edition_

github.cabal

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cabal-version: 2.4
22
name: github
3-
version: 0.29
4-
x-revision: 5
3+
version: 0.29.1
54
synopsis: Access to the GitHub API, v3.
65
category: Network
76
description:
@@ -42,9 +41,6 @@ tested-with:
4241
GHC == 8.6.5
4342
GHC == 8.4.4
4443
GHC == 8.2.2
45-
-- Build failure of HsOpenSSL with GHC 8.0
46-
-- https://github.com/haskell-cryptography/HsOpenSSL/issues/97
47-
-- GHC == 8.0.2
4844

4945
extra-doc-files:
5046
README.md
@@ -66,11 +62,9 @@ library
6662
default-language: Haskell2010
6763
ghc-options:
6864
-Wall
69-
if impl(ghc >= 8.0)
70-
ghc-options:
71-
-Wcompat
72-
-Wno-star-is-type
73-
-- The star-is-type warning cannot be sensiblity addressed while supporting GHC 7.
65+
-Wcompat
66+
-Wno-star-is-type
67+
-- The star-is-type warning cannot be sensiblity addressed while supporting GHC 7.
7468
hs-source-dirs: src
7569
default-extensions:
7670
DataKinds
@@ -188,15 +182,15 @@ library
188182

189183
-- Packages bundles with GHC, mtl and text are also here
190184
build-depends:
191-
base >=4.7 && <5
185+
base >=4.10 && <5
192186
, binary >=0.7.1.0 && <0.11
193187
, bytestring >=0.10.4.0 && <0.13
194188
, containers >=0.5.5.1 && <0.8
195189
, deepseq >=1.3.0.2 && <1.6
196190
, exceptions >=0.10.2 && <0.11
197191
, mtl >=2.1.3.1 && <2.2 || >=2.2.1 && <2.4
198192
, text >=1.2.0.6 && <2.2
199-
, time-compat >=1.9.2.2 && <1.10
193+
, time >=1.9.2 && <2
200194
, transformers >=0.3.0.0 && <0.7
201195

202196
-- other packages
@@ -229,9 +223,6 @@ library
229223
http-client-tls >=0.3.5.3 && <0.4
230224
, tls >=1.4.1
231225

232-
if !impl(ghc >=8.0)
233-
build-depends: semigroups >=0.18.5 && <0.20
234-
235226
test-suite github-test
236227
default-language: Haskell2010
237228
type: exitcode-stdio-1.0

samples/Operational/Operational.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE DataKinds #-}
32
{-# LANGUAGE GADTs #-}
43
{-# LANGUAGE OverloadedStrings #-}
4+
55
module Main (main) where
66

77
import Common

src/GitHub/Data.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{-# LANGUAGE CPP #-}
2-
31
-- |
42
-- This module re-exports the @GitHub.Data.@ and "GitHub.Auth" submodules.
53

src/GitHub/Data/Name.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
module GitHub.Data.Name (
32
Name(..),
43
mkName,
@@ -8,10 +7,8 @@ module GitHub.Data.Name (
87
import Prelude ()
98
import GitHub.Internal.Prelude
109

11-
#if MIN_VERSION_aeson(1,0,0)
1210
import Data.Aeson.Types
1311
(FromJSONKey (..), ToJSONKey (..), fromJSONKeyCoerce, toJSONKeyText)
14-
#endif
1512

1613
newtype Name entity = N Text
1714
deriving (Eq, Ord, Show, Generic, Typeable, Data)
@@ -38,12 +35,10 @@ instance ToJSON (Name entity) where
3835
instance IsString (Name entity) where
3936
fromString = N . fromString
4037

41-
#if MIN_VERSION_aeson(1,0,0)
4238
-- | @since 0.15.0.0
4339
instance ToJSONKey (Name entity) where
4440
toJSONKey = toJSONKeyText untagName
4541

4642
-- | @since 0.15.0.0
4743
instance FromJSONKey (Name entity) where
4844
fromJSONKey = fromJSONKeyCoerce
49-
#endif

src/GitHub/Data/RateLimit.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module GitHub.Data.RateLimit where
33
import GitHub.Internal.Prelude
44
import Prelude ()
55

6-
import Data.Time.Clock.System.Compat (SystemTime (..))
6+
import Data.Time.Clock.System (SystemTime (..))
77

88
import qualified Data.ByteString.Char8 as BS8
99
import qualified Network.HTTP.Client as HTTP

src/GitHub/Data/Repos.hs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE FlexibleInstances #-}
3-
#define UNSAFE 1
42

53
-- |
64
-- This module also exports
@@ -19,13 +17,7 @@ import Prelude ()
1917

2018
import qualified Data.HashMap.Strict as HM
2119
import qualified Data.Text as T
22-
#if MIN_VERSION_aeson(1,0,0)
2320
import Data.Aeson.Types (FromJSONKey (..), fromJSONKeyCoerce)
24-
#else
25-
#ifdef UNSAFE
26-
import Unsafe.Coerce (unsafeCoerce)
27-
#endif
28-
#endif
2921

3022
data Repo = Repo
3123
{ repoId :: !(Id Repo)
@@ -383,22 +375,8 @@ instance FromJSON Language where
383375
instance ToJSON Language where
384376
toJSON = toJSON . getLanguage
385377

386-
#if MIN_VERSION_aeson(1,0,0)
387378
instance FromJSONKey Language where
388379
fromJSONKey = fromJSONKeyCoerce
389-
#else
390-
instance FromJSON a => FromJSON (HM.HashMap Language a) where
391-
parseJSON = fmap mapKeyLanguage . parseJSON
392-
where
393-
mapKeyLanguage :: HM.HashMap Text a -> HM.HashMap Language a
394-
#ifdef UNSAFE
395-
mapKeyLanguage = unsafeCoerce
396-
#else
397-
mapKeyLanguage = mapKey Language
398-
mapKey :: (Eq k2, Hashable k2) => (k1 -> k2) -> HM.HashMap k1 a -> HM.HashMap k2 a
399-
mapKey f = HM.fromList . map (first f) . HM.toList
400-
#endif
401-
#endif
402380

403381
data ArchiveFormat
404382
= ArchiveFormatTarball -- ^ ".tar.gz" format

src/GitHub/Data/Request.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
{-# LANGUAGE FlexibleContexts #-}
32
{-# LANGUAGE GADTs #-}
43
{-# LANGUAGE KindSignatures #-}

src/GitHub/Endpoints/Issues.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{-# LANGUAGE CPP #-}
2-
31
-- |
42
-- The issues API as described on <http://developer.github.com/v3/issues/>.
53

src/GitHub/Endpoints/Repos/Comments.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{-# LANGUAGE CPP #-}
2-
31
-- |
42
-- The repo commits API as described on
53
-- <http://developer.github.com/v3/repos/comments/>.

src/GitHub/Endpoints/Repos/Commits.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{-# LANGUAGE CPP #-}
2-
31
-- |
42
-- The repo commits API as described on
53
-- <http://developer.github.com/v3/repos/commits/>.

src/GitHub/Internal/Prelude.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2-
{-# LANGUAGE CPP #-}
32

43
-- |
54
-- This module may change between minor releases. Do not rely on its contents.
@@ -24,7 +23,7 @@ import Data.Maybe as X (catMaybes)
2423
import Data.Semigroup as X (Semigroup (..))
2524
import Data.String as X (IsString (..))
2625
import Data.Text as X (Text, pack, unpack)
27-
import Data.Time.Compat as X (UTCTime)
26+
import Data.Time as X (UTCTime)
2827
import Data.Time.ISO8601 as X (formatISO8601)
2928
import Data.Vector as X (Vector)
3029
import GHC.Generics as X (Generic)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy