Skip to content

Commit 15d9246

Browse files
authored
Merge pull request #1025 from haskell/no-base-compat
Resolve #1000: Drop dependendency on base-compat, require GHC-8.2
2 parents 4440287 + b96ea76 commit 15d9246

File tree

27 files changed

+96
-239
lines changed

27 files changed

+96
-239
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.15.20230313
11+
# version: 0.16.3
1212
#
13-
# REGENDATA ("0.15.20230313",["github","cabal.project"])
13+
# REGENDATA ("0.16.3",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -77,11 +77,6 @@ jobs:
7777
compilerVersion: 8.2.2
7878
setup-method: hvr-ppa
7979
allow-failure: false
80-
- compiler: ghc-8.0.2
81-
compilerKind: ghc
82-
compilerVersion: 8.0.2
83-
setup-method: hvr-ppa
84-
allow-failure: false
8580
fail-fast: false
8681
steps:
8782
- name: apt
@@ -90,7 +85,7 @@ jobs:
9085
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
9186
if [ "${{ matrix.setup-method }}" = ghcup ]; then
9287
mkdir -p "$HOME/.ghcup/bin"
93-
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
88+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
9489
chmod a+x "$HOME/.ghcup/bin/ghcup"
9590
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
9691
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
@@ -99,7 +94,7 @@ jobs:
9994
apt-get update
10095
apt-get install -y "$HCNAME"
10196
mkdir -p "$HOME/.ghcup/bin"
102-
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
97+
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
10398
chmod a+x "$HOME/.ghcup/bin/ghcup"
10499
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
105100
fi
@@ -177,22 +172,22 @@ jobs:
177172
- name: cache (tools)
178173
uses: actions/cache/restore@v3
179174
with:
180-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-cd9045c2
175+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a3d9d05c
181176
path: ~/.haskell-ci-tools
182177
- name: install cabal-plan
183178
run: |
184179
mkdir -p $HOME/.cabal/bin
185-
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
186-
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
180+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz
181+
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
187182
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
188183
rm -f cabal-plan.xz
189184
chmod a+x $HOME/.cabal/bin/cabal-plan
190185
cabal-plan --version
191186
- name: install cabal-docspec
192187
run: |
193188
mkdir -p $HOME/.cabal/bin
194-
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20211114/cabal-docspec-0.0.0.20211114.xz > cabal-docspec.xz
195-
echo 'e224700d9e8c9ec7ec6bc3f542ba433cd9925a5d356676c62a9bd1f2c8be8f8a cabal-docspec.xz' | sha256sum -c -
189+
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20230517/cabal-docspec-0.0.0.20230517-x86_64-linux.xz > cabal-docspec.xz
190+
echo '3b31bbe463ad4d671abbc103db49628562ec48a6604cab278207b5b6acd21ed7 cabal-docspec.xz' | sha256sum -c -
196191
xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
197192
rm -f cabal-docspec.xz
198193
chmod a+x $HOME/.cabal/bin/cabal-docspec
@@ -201,7 +196,7 @@ jobs:
201196
uses: actions/cache/save@v3
202197
if: always()
203198
with:
204-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-cd9045c2
199+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a3d9d05c
205200
path: ~/.haskell-ci-tools
206201
- name: checkout
207202
uses: actions/checkout@v3
@@ -240,14 +235,14 @@ jobs:
240235
echo "packages: ${PKGDIR_attoparsec_iso8601}" >> cabal.project
241236
echo "packages: ${PKGDIR_aeson_examples}" >> cabal.project
242237
echo "packages: ${PKGDIR_aeson_benchmarks}" >> cabal.project
243-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package aeson" >> cabal.project ; fi
244-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
245-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package attoparsec-iso8601" >> cabal.project ; fi
246-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
247-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package aeson-examples" >> cabal.project ; fi
248-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
249-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package aeson-benchmarks" >> cabal.project ; fi
250-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
238+
echo "package aeson" >> cabal.project
239+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
240+
echo "package attoparsec-iso8601" >> cabal.project
241+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
242+
echo "package aeson-examples" >> cabal.project
243+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
244+
echo "package aeson-benchmarks" >> cabal.project
245+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
251246
cat >> cabal.project <<EOF
252247
allow-newer: hermes-json:attoparsec-iso8601
253248
EOF

aeson.cabal

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ author: Bryan O'Sullivan <[email protected]>
1212
maintainer: Adam Bergmark <[email protected]>
1313
stability: experimental
1414
tested-with:
15-
GHC ==8.0.2
16-
|| ==8.2.2
15+
GHC ==8.2.2
1716
|| ==8.4.4
1817
|| ==8.6.5
1918
|| ==8.8.4
@@ -91,6 +90,7 @@ library
9190
Data.Aeson.Internal.ByteString
9291
Data.Aeson.Internal.Functions
9392
Data.Aeson.Internal.Integer
93+
Data.Aeson.Internal.Prelude
9494
Data.Aeson.Internal.Text
9595
Data.Aeson.Internal.TH
9696
Data.Aeson.Internal.Word8
@@ -106,20 +106,19 @@ library
106106

107107
-- GHC bundled libs
108108
build-depends:
109-
base >=4.9.0.0 && <5
110-
, bytestring >=0.10.8.1 && <0.12
111-
, containers >=0.5.7.1 && <0.7
112-
, deepseq >=1.4.2.0 && <1.5
109+
base >=4.10.0.0 && <5
110+
, bytestring >=0.10.8.2 && <0.12
111+
, containers >=0.5.10.2 && <0.7
112+
, deepseq >=1.4.3.0 && <1.5
113113
, exceptions >=0.10.4 && <0.11
114114
, ghc-prim >=0.5.0.0 && <0.11
115-
, template-haskell >=2.11.0.0 && <2.21
115+
, template-haskell >=2.12.0.0 && <2.21
116116
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.1
117-
, time >=1.6.0.1 && <1.13
117+
, time >=1.8.0.2 && <1.13
118118

119119
-- Compat
120120
build-depends:
121-
base-compat-batteries >=0.10.0 && <0.14
122-
, generically >=0.1 && <0.2
121+
generically >=0.1 && <0.2
123122
, time-compat >=1.9.6 && <1.10
124123

125124
if !impl(ghc >=8.6)

attoparsec-iso8601/attoparsec-iso8601.cabal

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: attoparsec-iso8601
2-
version: 1.1.0.0
3-
x-revision: 1
2+
version: 1.1.0.1
43
synopsis: Parsing of ISO 8601 dates, originally from aeson
54
description: Parsing of ISO 8601 dates, originally from aeson.
65
license: BSD3
@@ -15,7 +14,7 @@ cabal-version: >=1.10
1514
homepage: https://github.com/haskell/aeson
1615
bug-reports: https://github.com/haskell/aeson/issues
1716
build-type: Simple
18-
tested-with: GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC ==9.2.7, GHC==9.4.4, GHC ==9.6.1
17+
tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC ==9.2.7, GHC==9.4.4, GHC ==9.6.1
1918
extra-source-files:
2019
README.md
2120
changelog.md
@@ -29,8 +28,7 @@ library
2928
Data.Attoparsec.Time
3029
build-depends:
3130
attoparsec >= 0.14.2 && < 0.15,
32-
base >= 4.9 && < 5,
33-
base-compat-batteries >= 0.10.0 && < 0.14,
31+
base >= 4.10.0.0 && < 5,
3432
time-compat >= 1.9.4 && < 1.10,
3533
text >= 1.2.3.0 && < 1.3.0.0 || >= 2.0 && <2.1,
3634
time >= 1.6.0.1 && < 1.13

attoparsec-iso8601/src/Data/Attoparsec/Time.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE BangPatterns #-}
2-
{-# LANGUAGE NoImplicitPrelude #-}
32
{-# LANGUAGE ScopedTypeVariables #-}
43
-- |
54
-- Module: Data.Aeson.Parser.Time
@@ -24,8 +23,6 @@ module Data.Attoparsec.Time
2423
, quarter
2524
) where
2625

27-
import Prelude.Compat
28-
2926
import Control.Applicative ((<|>))
3027
import Control.Monad (void, when)
3128
import Data.Attoparsec.Text (Parser, char, digit, option, anyChar, peekChar, peekChar', takeWhile1, satisfy)

attoparsec-iso8601/src/Data/Attoparsec/Time/Internal.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
21
-- |
32
-- Module: Data.Aeson.Internal.Time
43
-- Copyright: (c) 2015-2016 Bryan O'Sullivan
@@ -16,7 +15,6 @@ module Data.Attoparsec.Time.Internal
1615
, toTimeOfDay64
1716
) where
1817

19-
import Prelude.Compat
2018

2119
import Data.Fixed (Fixed(MkFixed), Pico)
2220
import Data.Int (Int64)

benchmarks/aeson-benchmarks.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: aeson-benchmarks
33
version: 0
44
build-type: Simple
55
tested-with:
6-
GHC ==8.0.2
7-
|| ==8.2.2
6+
GHC ==8.2.2
87
|| ==8.4.4
98
|| ==8.6.5
109
|| ==8.8.4

examples/aeson-examples.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ synopsis: Aeson examples
99
description: Various aeson examples, also used in benchmarks
1010
maintainer: Adam Bergmark <[email protected]>
1111
tested-with:
12-
GHC ==8.0.2
13-
|| ==8.2.2
12+
GHC ==8.2.2
1413
|| ==8.4.4
1514
|| ==8.6.5
1615
|| ==8.8.4

src/Data/Aeson.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
21
{-# LANGUAGE ScopedTypeVariables #-}
32
-- |
43
-- Module: Data.Aeson
@@ -159,8 +158,6 @@ module Data.Aeson
159158
, parseIndexedJSON
160159
) where
161160

162-
import Prelude.Compat
163-
164161
import Control.Exception (Exception (..))
165162
import Control.Monad.Catch (MonadThrow (..))
166163
import Data.Aeson.Types.FromJSON (ifromJSON, parseIndexedJSON)

src/Data/Aeson/Decoding/Tokens.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ module Data.Aeson.Decoding.Tokens (
1010
) where
1111

1212
import Data.Aeson.Key (Key)
13-
import Data.Bifoldable.Compat (Bifoldable (..))
14-
import Data.Bifunctor.Compat (Bifunctor (..))
15-
import Data.Bitraversable.Compat (Bitraversable (..), bifoldMapDefault, bimapDefault)
13+
import Data.Bifoldable (Bifoldable (..))
14+
import Data.Bifunctor (Bifunctor (..))
15+
import Data.Bitraversable (Bitraversable (..), bifoldMapDefault, bimapDefault)
1616
import Data.Scientific (Scientific)
1717
import Data.Text (Text)
1818

src/Data/Aeson/Encoding/Builder.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE BangPatterns #-}
2-
{-# LANGUAGE NoImplicitPrelude #-}
32
{-# LANGUAGE TupleSections #-}
43
-- |
54
-- Module: Data.Aeson.Encoding.Builder
@@ -38,7 +37,7 @@ module Data.Aeson.Encoding.Builder
3837
, ascii5
3938
) where
4039

41-
import Prelude.Compat
40+
import Data.Aeson.Internal.Prelude
4241

4342
import Data.Attoparsec.Time.Internal
4443
import Data.Aeson.Types.Internal (Value (..), Key)
@@ -50,14 +49,13 @@ import Data.ByteString.Builder.Prim ((>$<), (>*<))
5049
import qualified Data.ByteString.Builder.Prim as BP
5150
import Data.ByteString.Builder.Scientific (scientificBuilder)
5251
import Data.Char (chr, ord)
53-
import Data.Scientific (Scientific, base10Exponent, coefficient)
52+
import Data.Scientific (base10Exponent, coefficient)
5453
import Data.Text.Encoding (encodeUtf8BuilderEscaped)
5554
import Data.Time (UTCTime(..))
5655
import Data.Time.Calendar (Day(..), toGregorian)
5756
import Data.Time.Calendar.Month.Compat (Month, toYearMonth)
5857
import Data.Time.Calendar.Quarter.Compat (Quarter, toYearQuarter, QuarterOfYear (..))
5958
import Data.Time.LocalTime (LocalTime (..), TimeZone (..), ZonedTime (..), TimeOfDay (..))
60-
import Data.Word (Word8)
6159
import qualified Data.Text as T
6260
import qualified Data.Vector as V
6361

0 commit comments

Comments
 (0)