Skip to content

Commit 92f13fa

Browse files
committed
Support GHC-9.12
1 parent 027bb0a commit 92f13fa

File tree

11 files changed

+66
-69
lines changed

11 files changed

+66
-69
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 29 additions & 21 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.19.20240514
11+
# version: 0.19.20250104
1212
#
13-
# REGENDATA ("0.19.20240514",["github","cabal.project"])
13+
# REGENDATA ("0.19.20250104",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,19 +32,24 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.12.1
36+
compilerKind: ghc
37+
compilerVersion: 9.12.1
38+
setup-method: ghcup
39+
allow-failure: false
3540
- compiler: ghc-9.10.1
3641
compilerKind: ghc
3742
compilerVersion: 9.10.1
3843
setup-method: ghcup
3944
allow-failure: false
40-
- compiler: ghc-9.8.2
45+
- compiler: ghc-9.8.4
4146
compilerKind: ghc
42-
compilerVersion: 9.8.2
47+
compilerVersion: 9.8.4
4348
setup-method: ghcup
4449
allow-failure: false
45-
- compiler: ghc-9.6.5
50+
- compiler: ghc-9.6.6
4651
compilerKind: ghc
47-
compilerVersion: 9.6.5
52+
compilerVersion: 9.6.6
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.4.8
@@ -79,15 +84,29 @@ jobs:
7984
allow-failure: false
8085
fail-fast: false
8186
steps:
82-
- name: apt
87+
- name: apt-get install
8388
run: |
8489
apt-get update
8590
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91+
- name: Install GHCup
92+
run: |
8693
mkdir -p "$HOME/.ghcup/bin"
87-
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
94+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
8895
chmod a+x "$HOME/.ghcup/bin/ghcup"
96+
- name: Install cabal-install
97+
run: |
98+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -vnormal+nowrap" >> "$GITHUB_ENV"
100+
- name: Install GHC (GHCup)
101+
if: matrix.setup-method == 'ghcup'
102+
run: |
89103
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
104+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107+
echo "HC=$HC" >> "$GITHUB_ENV"
108+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
91110
env:
92111
HCKIND: ${{ matrix.compilerKind }}
93112
HCNAME: ${{ matrix.compiler }}
@@ -98,21 +117,12 @@ jobs:
98117
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
99118
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
100119
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
101-
HCDIR=/opt/$HCKIND/$HCVER
102-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105-
echo "HC=$HC" >> "$GITHUB_ENV"
106-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
110121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
111122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112123
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
113124
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114125
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
116126
env:
117127
HCKIND: ${{ matrix.compilerKind }}
118128
HCNAME: ${{ matrix.compiler }}
@@ -219,8 +229,6 @@ jobs:
219229
echo "package these-tests" >> cabal.project
220230
echo " ghc-options: -Werror=missing-methods" >> cabal.project
221231
cat >> cabal.project <<EOF
222-
allow-newer: quickcheck-instances:base
223-
allow-newer: quickcheck-instances:containers
224232
EOF
225233
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(monad-chronicle|semialign|these|these-lens|these-optics|these-tests)$/; }' >> cabal.project.local
226234
cat cabal.project
@@ -284,8 +292,8 @@ jobs:
284292
cabal-plan topo | sort
285293
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='monad-chronicle -semigroupoids' --constraint='semialign -semigroupoids' all
286294
- name: save cache
287-
uses: actions/cache/save@v4
288295
if: always()
296+
uses: actions/cache/save@v4
289297
with:
290298
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
291299
path: ~/.cabal/store

cabal.project

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@ packages: monad-chronicle
66
packages: these-tests
77

88
tests: true
9-
10-
allow-newer: quickcheck-instances:base
11-
allow-newer: quickcheck-instances:containers

monad-chronicle/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.1
2+
3+
- Remove `disclose`. Use `dictate c >> return def` if you need it.
4+
No more dependency of `data-default` or `data-default-class`.
5+
This change is a consequence of change in `data-default-0.8.0.0`
6+
17
# 1.0.2
28

39
- Support GHC-8.6.5...GHC-9.10.1

monad-chronicle/monad-chronicle.cabal

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: >=1.10
22
name: monad-chronicle
3-
version: 1.0.2
3+
version: 1.1
44
synopsis: These as a transformer, ChronicleT
55
homepage: https://github.com/haskellari/these
66
license: BSD3
@@ -22,9 +22,10 @@ tested-with:
2222
|| ==9.0.2
2323
|| ==9.2.8
2424
|| ==9.4.8
25-
|| ==9.6.5
26-
|| ==9.8.2
25+
|| ==9.6.6
26+
|| ==9.8.4
2727
|| ==9.10.1
28+
|| ==9.12.1
2829

2930
source-repository head
3031
type: git
@@ -46,16 +47,14 @@ library
4647

4748
-- ghc boot libs
4849
build-depends:
49-
base >=4.12.0.0 && <4.21
50+
base >=4.12.0.0 && <4.22
5051
, mtl >=2.2.2 && <2.4
5152
, transformers >=0.5.6.2 && <0.7
5253

5354
build-depends: these >=1.2.1 && <1.3
5455

5556
-- other dependencies
56-
build-depends:
57-
data-default-class >=0.1.2.0 && <0.2
58-
, transformers-compat >=0.6.5 && <0.8
57+
build-depends: transformers-compat >=0.6.5 && <0.8
5958

6059
if flag(semigroupoids)
6160
build-depends: semigroupoids >=6.0.1 && <6.1

monad-chronicle/src/Control/Monad/Chronicle/Class.hs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import Control.Monad.Trans.Error as Error
4141

4242
import Control.Monad (liftM)
4343
import Control.Monad.Trans.Class (lift)
44-
import Data.Default.Class
4544
import Data.Semigroup
4645
import Prelude
4746

@@ -51,15 +50,6 @@ class (Monad m) => MonadChronicle c m | m -> c where
5150
-- Equivalent to 'tell' for the 'Writer' monad.
5251
dictate :: c -> m ()
5352

54-
-- | @'disclose' c@ is an action that records the output @c@ and returns a
55-
-- @'Default'@ value.
56-
--
57-
-- This is a convenience function for reporting non-fatal errors in one
58-
-- branch a @case@, or similar scenarios when there is no meaningful
59-
-- result but a placeholder of sorts is needed in order to continue.
60-
disclose :: (Default a) => c -> m a
61-
disclose c = dictate c >> return def
62-
6353
-- | @'confess' c@ is an action that ends with a final record @c@.
6454
--
6555
-- Equivalent to 'throwError' for the 'Error' monad.

monad-chronicle/src/Control/Monad/Trans/Chronicle.hs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module Control.Monad.Trans.Chronicle (
1919
-- * The ChronicleT monad transformer
2020
ChronicleT(..),
2121
-- * Chronicle operations
22-
dictate, disclose, confess,
22+
dictate, confess,
2323
memento, absolve, condemn,
2424
retcon,
2525
) where
@@ -28,7 +28,6 @@ import Control.Applicative
2828
import Control.Monad
2929
import Control.Monad.Fix
3030
import Control.Monad.Trans
31-
import Data.Default.Class
3231
import Data.Functor.Identity
3332
import Data.Semigroup
3433

@@ -155,15 +154,6 @@ instance (Semigroup c, MonadFix m) => MonadFix (ChronicleT c m) where
155154
dictate :: (Semigroup c, Monad m) => c -> ChronicleT c m ()
156155
dictate c = ChronicleT $ return (These c ())
157156

158-
-- | @'disclose' c@ is an action that records the output @c@ and returns a
159-
-- @'Default'@ value.
160-
--
161-
-- This is a convenience function for reporting non-fatal errors in one
162-
-- branch a @case@, or similar scenarios when there is no meaningful
163-
-- result but a placeholder of sorts is needed in order to continue.
164-
disclose :: (Default a, Semigroup c, Monad m) => c -> ChronicleT c m a
165-
disclose c = dictate c >> return def
166-
167157
-- | @'confess' c@ is an action that ends with a final output @c@.
168158
--
169159
-- Equivalent to 'throwError' for the 'Error' monad.

semialign/semialign.cabal

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ tested-with:
2828
|| ==9.0.2
2929
|| ==9.2.8
3030
|| ==9.4.8
31-
|| ==9.6.5
32-
|| ==9.8.2
31+
|| ==9.6.6
32+
|| ==9.8.4
3333
|| ==9.10.1
34+
|| ==9.12.1
3435

3536
source-repository head
3637
type: git
@@ -61,7 +62,7 @@ library
6162

6263
-- ghc boot libs
6364
build-depends:
64-
base >=4.12.0.0 && <4.21
65+
base >=4.12.0.0 && <4.22
6566
, containers >=0.6.0.1 && <0.8
6667
, transformers >=0.5.6.2 && <0.7
6768

these-lens/these-lens.cabal

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cabal-version: >=1.10
22
name: these-lens
33
version: 1.0.2
4+
x-revision: 1
45
synopsis: Lenses for These
56
homepage: https://github.com/haskellari/these
67
license: BSD3
@@ -18,9 +19,10 @@ tested-with:
1819
|| ==9.0.2
1920
|| ==9.2.8
2021
|| ==9.4.8
21-
|| ==9.6.5
22-
|| ==9.8.2
22+
|| ==9.6.6
23+
|| ==9.8.4
2324
|| ==9.10.1
25+
|| ==9.12.1
2426

2527
source-repository head
2628
type: git
@@ -34,7 +36,7 @@ library
3436
exposed-modules: Data.These.Lens
3537

3638
-- ghc boot libs
37-
build-depends: base >=4.12.0.0 && <4.21
39+
build-depends: base >=4.12.0.0 && <4.22
3840
build-depends: these >=1.2.1 && <1.3
3941

4042
-- other dependencies

these-optics/these-optics.cabal

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cabal-version: >=1.10
22
name: these-optics
33
version: 1.0.2
4+
x-revision: 1
45
synopsis: Optics for These
56
homepage: https://github.com/haskellari/these
67
license: BSD3
@@ -18,9 +19,10 @@ tested-with:
1819
|| ==9.0.2
1920
|| ==9.2.8
2021
|| ==9.4.8
21-
|| ==9.6.5
22-
|| ==9.8.2
22+
|| ==9.6.6
23+
|| ==9.8.4
2324
|| ==9.10.1
25+
|| ==9.12.1
2426

2527
source-repository head
2628
type: git
@@ -34,7 +36,7 @@ library
3436
exposed-modules: Data.These.Optics
3537

3638
-- ghc boot libs
37-
build-depends: base >=4.12 && <4.21
39+
build-depends: base >=4.12 && <4.22
3840

3941
-- these
4042
build-depends: these >=1.2.1 && <1.3

these-tests/these-tests.cabal

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ tested-with:
1919
|| ==9.0.2
2020
|| ==9.2.8
2121
|| ==9.4.8
22-
|| ==9.6.5
23-
|| ==9.8.2
22+
|| ==9.6.6
23+
|| ==9.8.4
2424
|| ==9.10.1
25+
|| ==9.12.1
2526

2627
source-repository head
2728
type: git
@@ -50,7 +51,7 @@ test-suite test
5051
-- library constrained dependencies
5152
build-depends:
5253
assoc
53-
, base
54+
, base <5
5455
, binary
5556
, containers
5657
, hashable
@@ -70,5 +71,5 @@ test-suite test
7071
lattices >=2.2.1 && <2.3
7172
, quickcheck-instances >=0.3.23 && <0.4
7273
, tasty >=1.2 && <1.6
73-
, tasty-quickcheck >=0.10 && <0.11
74+
, tasty-quickcheck >=0.11 && <0.12
7475
, transformers-compat >=0.6.5 && <0.8

0 commit comments

Comments
 (0)