Skip to content

Commit 65d44f7

Browse files
committed
Support GHC-9.14
1 parent 906be60 commit 65d44f7

File tree

5 files changed

+55
-41
lines changed

5 files changed

+55
-41
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This GitHub workflow config has been generated by a script via
22
#
3-
# haskell-ci 'github' 'integer-logarithms.cabal'
3+
# haskell-ci 'github' 'cabal.project'
44
#
55
# To regenerate the script (for example after adjusting tested-with) run
66
#
77
# haskell-ci regenerate
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20241220
11+
# version: 0.19.20260104
1212
#
13-
# REGENDATA ("0.19.20241220",["github","integer-logarithms.cabal"])
13+
# REGENDATA ("0.19.20260104",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -20,10 +20,13 @@ on:
2020
pull_request:
2121
branches:
2222
- master
23+
merge_group:
24+
branches:
25+
- master
2326
jobs:
2427
linux:
2528
name: Haskell-CI - Linux - ${{ matrix.compiler }}
26-
runs-on: ubuntu-20.04
29+
runs-on: ubuntu-24.04
2730
timeout-minutes:
2831
60
2932
container:
@@ -32,14 +35,19 @@ jobs:
3235
strategy:
3336
matrix:
3437
include:
35-
- compiler: ghc-9.12.1
38+
- compiler: ghc-9.14.1
39+
compilerKind: ghc
40+
compilerVersion: 9.14.1
41+
setup-method: ghcup
42+
allow-failure: false
43+
- compiler: ghc-9.12.2
3644
compilerKind: ghc
37-
compilerVersion: 9.12.1
45+
compilerVersion: 9.12.2
3846
setup-method: ghcup
3947
allow-failure: false
40-
- compiler: ghc-9.10.1
48+
- compiler: ghc-9.10.2
4149
compilerKind: ghc
42-
compilerVersion: 9.10.1
50+
compilerVersion: 9.10.2
4351
setup-method: ghcup
4452
allow-failure: false
4553
- compiler: ghc-9.8.4
@@ -91,13 +99,12 @@ jobs:
9199
- name: Install GHCup
92100
run: |
93101
mkdir -p "$HOME/.ghcup/bin"
94-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
102+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
95103
chmod a+x "$HOME/.ghcup/bin/ghcup"
96-
- name: Install cabal-install (prerelease)
104+
- name: Install cabal-install
97105
run: |
98-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
99-
"$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
100-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
106+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
107+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
101108
- name: Install GHC (GHCup)
102109
if: matrix.setup-method == 'ghcup'
103110
run: |
@@ -173,7 +180,7 @@ jobs:
173180
chmod a+x $HOME/.cabal/bin/cabal-plan
174181
cabal-plan --version
175182
- name: checkout
176-
uses: actions/checkout@v4
183+
uses: actions/checkout@v5
177184
with:
178185
path: source
179186
- name: initial cabal.project for sdist
@@ -198,8 +205,13 @@ jobs:
198205
touch cabal.project.local
199206
echo "packages: ${PKGDIR_integer_logarithms}" >> cabal.project
200207
echo "package integer-logarithms" >> cabal.project
201-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
208+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
209+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package integer-logarithms" >> cabal.project ; fi
210+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
211+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package integer-logarithms" >> cabal.project ; fi
212+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
202213
cat >> cabal.project <<EOF
214+
allow-newer: splitmix-0.1.3.1:base
203215
EOF
204216
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(integer-logarithms)$/; }' >> cabal.project.local
205217
cat cabal.project

cabal.haskell-ci

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
branches: master
2-
tests: >=7.4
32
head-hackage: False
43

54
constraint-set check-bounds

cabal.project

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
packages: .
22
tests: True
33

4-
-- helpful with GHC HEAD
5-
-- constraints: QuickCheck -templatehaskell
4+
if impl(ghc >=9.10)
5+
package integer-logarithms
6+
ghc-options: -Wunused-packages
7+
8+
allow-newer: splitmix-0.1.3.1:base

integer-logarithms.cabal

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: integer-logarithms
2-
version: 1.0.4
2+
version: 1.0.5
33
cabal-version: >=1.10
44
author: Daniel Fischer
55
copyright:
@@ -23,16 +23,17 @@ description:
2323

2424
category: Math, Algorithms, Number Theory
2525
tested-with:
26-
GHC ==8.6.5
27-
|| ==8.8.4
28-
|| ==8.10.4
29-
|| ==9.0.2
30-
|| ==9.2.8
31-
|| ==9.4.8
32-
|| ==9.6.6
33-
|| ==9.8.4
34-
|| ==9.10.1
35-
|| ==9.12.1
26+
GHC ==8.6.5
27+
|| ==8.8.4
28+
|| ==8.10.4
29+
|| ==9.0.2
30+
|| ==9.2.8
31+
|| ==9.4.8
32+
|| ==9.6.6
33+
|| ==9.8.4
34+
|| ==9.10.2
35+
|| ==9.12.2
36+
|| ==9.14.1
3637

3738
extra-source-files:
3839
changelog.md
@@ -52,17 +53,14 @@ library
5253
default-language: Haskell2010
5354
hs-source-dirs: src
5455
build-depends:
55-
array >=0.5.3.0 && <0.6
56-
, base >=4.12.0.0 && <4.22
57-
, ghc-prim <0.14
56+
array >=0.5.3.0 && <0.6
57+
, base >=4.12.0.0 && <4.23
5858

5959
if !impl(ghc >=7.10)
6060
build-depends: nats >=1.1.2 && <1.2
6161

6262
if impl(ghc >=9.0)
63-
build-depends:
64-
base >=4.15
65-
, ghc-bignum >=1.0 && <1.4
63+
build-depends: base >=4.15
6664

6765
if !flag(integer-gmp)
6866
build-depends: invalid-cabal-flag-settings <0
@@ -113,12 +111,11 @@ test-suite spec
113111
build-depends:
114112
base
115113
, integer-logarithms
116-
, QuickCheck >=2.14.1 && <2.16
117-
, smallcheck >=1.2 && <1.3
118-
, tasty >=1.4 && <1.6
119-
, tasty-hunit >=0.10 && <0.11
120-
, tasty-quickcheck >=0.10 && <0.12
121-
, tasty-smallcheck >=0.8 && <0.9
114+
, QuickCheck >=2.16.0.0 && <2.18
115+
, smallcheck >=1.2 && <1.3
116+
, tasty >=1.4 && <1.6
117+
, tasty-quickcheck >=0.10 && <0.12
118+
, tasty-smallcheck >=0.8 && <0.9
122119

123120
other-modules:
124121
Math.NumberTheory.LogarithmsTests

test-suite/Orphans.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
{-# LANGUAGE CPP #-}
12
{-# OPTIONS_GHC -fno-warn-orphans #-}
23
module Orphans () where
34

45
import Numeric.Natural (Natural)
56
import Test.QuickCheck (Arbitrary (..))
67

8+
#if !MIN_VERSION_QuickCheck(2,17,0)
79
-- | The QuickCheck-2.10 doesn't define the Arbitrary Natural instance
810
-- We define own instance (and not use quickcheck-instance) to break
911
-- the cycle in tests.
1012
instance Arbitrary Natural where
1113
arbitrary = fmap (fromInteger . abs) arbitrary
1214
shrink = map (fromInteger . abs) . shrink . fromIntegral
15+
#endif

0 commit comments

Comments
 (0)