Skip to content

Commit ce9a6d2

Browse files
committed
Update for GHC 9.14.1 alpha 1
1 parent e81f35d commit ce9a6d2

File tree

5 files changed

+42
-41
lines changed

5 files changed

+42
-41
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 16 additions & 19 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.20241202
11+
# version: 0.19.20250821
1212
#
13-
# REGENDATA ("0.19.20241202",["github","ghc-exactprint.cabal","--ghcup-jobs"])
13+
# REGENDATA ("0.19.20250821",["github","ghc-exactprint.cabal","--ghcup-jobs"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
linux:
2121
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-24.04
2323
timeout-minutes:
2424
60
2525
container:
@@ -28,14 +28,14 @@ jobs:
2828
strategy:
2929
matrix:
3030
include:
31-
- compiler: ghc-9.12.0.20241128
31+
- compiler: ghc-9.14.0.20250819
3232
compilerKind: ghc
33-
compilerVersion: 9.12.0.20241128
33+
compilerVersion: 9.14.0.20250819
3434
setup-method: ghcup
3535
allow-failure: false
36-
- compiler: ghc-9.12.0.20241128
36+
- compiler: ghc-9.14.0.20250819
3737
compilerKind: ghc
38-
compilerVersion: 9.12.0.20241128
38+
compilerVersion: 9.14.0.20250819
3939
setup-method: ghcup-prerelease
4040
allow-failure: false
4141
fail-fast: false
@@ -47,15 +47,12 @@ jobs:
4747
- name: Install GHCup
4848
run: |
4949
mkdir -p "$HOME/.ghcup/bin"
50-
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
50+
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
5151
chmod a+x "$HOME/.ghcup/bin/ghcup"
5252
- name: Install cabal-install
5353
run: |
54-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
55-
"$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
56-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
57-
# "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
58-
# echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
54+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
55+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
5956
- name: Install GHC (GHCup)
6057
if: matrix.setup-method == 'ghcup'
6158
run: |
@@ -73,7 +70,7 @@ jobs:
7370
- name: Install GHC (GHCup prerelease)
7471
if: matrix.setup-method == 'ghcup-prerelease'
7572
run: |
76-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
73+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
7774
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
7875
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
7976
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
@@ -183,7 +180,11 @@ jobs:
183180
touch cabal.project.local
184181
echo "packages: ${PKGDIR_ghc_exactprint}" >> cabal.project
185182
echo "package ghc-exactprint" >> cabal.project
186-
echo " ghc-options: -Werror=missing-methods" >> cabal.project
183+
echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
184+
echo "package ghc-exactprint" >> cabal.project
185+
echo " ghc-options: -Werror=unused-packages" >> cabal.project
186+
echo "package ghc-exactprint" >> cabal.project
187+
echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
187188
cat >> cabal.project <<EOF
188189
EOF
189190
if $HEADHACKAGE; then
@@ -192,7 +193,6 @@ jobs:
192193
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(ghc-exactprint)$/; }' >> cabal.project.local
193194
cat cabal.project
194195
cat cabal.project.local
195-
pwd
196196
- name: dump install plan
197197
run: |
198198
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
@@ -215,9 +215,6 @@ jobs:
215215
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
216216
- name: tests
217217
run: |
218-
pwd
219-
cd ${PKGDIR_ghc_exactprint} || false
220-
pwd
221218
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
222219
- name: cabal check
223220
run: |

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
2727
-- allow-newer:
2828
-- ghc-paths:Cabal
2929

30+
3031
package ghc-exactprint
3132
test-show-details: direct
3233

configure.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,4 +268,7 @@ rm -fr dist*
268268
#--------------------------------------------------------------------
269269
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.13.20250301/bin/ghc --allow-newer
270270
# cabal configure -fdev --with-compiler=/opt/ghc/9.13.20250301/bin/ghc --allow-newer
271-
cabal configure -fdev -froundtrip --with-compiler=/opt/ghc/9.14.0.20250709/bin/ghc --allow-newer
271+
# cabal configure -fdev -froundtrip --with-compiler=/opt/ghc/9.14.0.20250709/bin/ghc --allow-newer
272+
273+
# cabal configure -fdev -froundtrip --with-compiler=/opt/ghc/9.14.0.20250902/bin/ghc --allow-newer
274+
cabal configure -fdev -froundtrip --with-compiler=/opt/ghc/9.14.0.20250902/bin/ghc

ghc-exactprint.cabal

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
cabal-version: 2.4
22
name: ghc-exactprint
3-
version: 1.12.0.0
3+
version: 1.14.0.0
44
synopsis: ExactPrint for GHC
55
description: Using the API Annotations available from GHC 9.2.1, this
66
library provides a means to round trip any code that can
77
be compiled by GHC, currently excluding lhs files.
88
.
9-
Note: requires GHC 9.12.*. For earlier GHC
9+
Note: requires GHC 9.14.*. For earlier GHC
1010
versions see lower version numbers.
1111
.
1212

@@ -16,12 +16,13 @@ author: Alan Zimmerman, Matthew Pickering
1616
maintainer: alan.zimm@gmail.com
1717
category: Development
1818
build-type: Simple
19-
tested-with: GHC == 9.12.1
19+
tested-with: GHC == 9.14.1
2020
extra-doc-files: ChangeLog
2121
extra-source-files: tests/examples/failing/*.hs
2222
tests/examples/failing/*.hs.bad
2323
tests/examples/ghc910/*.hs
2424
tests/examples/ghc912/*.hs
25+
tests/examples/ghc914/*.hs
2526
tests/examples/pre-ghc910/*.hs
2627
tests/examples/pre-ghc910/*.hs-boot
2728
tests/examples/transform/*.hs
@@ -55,10 +56,10 @@ library
5556
, Language.Haskell.GHC.ExactPrint.Utils
5657

5758
hs-source-dirs: src
58-
build-depends: base >=4.21 && <4.22
59-
, containers >= 0.5 && < 0.8
60-
, ghc >= 9.12 && < 9.13
61-
, ghc-boot >= 9.12 && < 9.13
59+
build-depends: base >=4.22 && <4.23
60+
, containers >= 0.5 && < 0.9
61+
, ghc >= 9.14 && < 9.15
62+
, ghc-boot >= 9.14 && < 9.15
6263
, mtl >= 2.2.1 && < 2.5
6364
, syb >= 0.5 && < 0.8
6465

@@ -82,13 +83,13 @@ Test-Suite test
8283
, Test.Transform
8384
GHC-Options: -threaded
8485
Default-language: Haskell2010
85-
Build-depends: base < 4.22
86+
Build-depends: base < 4.23
8687
, HUnit >= 1.2
8788
, containers >= 0.5
8889
, Diff
8990
, directory >= 1.2
9091
, filepath >= 1.4
91-
, ghc >= 9.12
92+
, ghc >= 9.14
9293
, ghc-paths >= 0.1
9394
, syb >= 0.5
9495
, silently >= 1.2
@@ -98,7 +99,7 @@ Test-Suite test
9899
mtl >= 2.2.1
99100
else
100101
build-depends: ghc-exactprint
101-
if impl (ghc < 9.12)
102+
if impl (ghc < 9.14)
102103
buildable: False
103104

104105
executable roundtrip
@@ -108,18 +109,18 @@ executable roundtrip
108109
other-modules: Test.Common
109110
Test.CommonUtils
110111
default-language: Haskell2010
111-
if impl (ghc >= 9.12) && flag (roundtrip)
112+
if impl (ghc >= 9.14) && flag (roundtrip)
112113
build-depends:
113114
HUnit < 1.7
114-
, base < 4.22
115-
, containers < 0.8
115+
, base < 4.23
116+
, containers < 0.9
116117
, directory < 1.4
117-
, extra < 1.8
118+
, extra < 1.9
118119
, filepath < 1.6
119-
, ghc >= 9.12 && < 9.13
120+
, ghc >= 9.14 && < 9.15
120121
, ghc-exactprint
121122
, ghc-paths < 0.2
122-
, time < 1.13
123+
, time < 1.16
123124
, ghc-boot
124125
buildable: True
125126
else
@@ -133,12 +134,12 @@ executable static
133134
other-modules: Test.CommonUtils
134135
default-language: Haskell2010
135136
if flag (roundtrip)
136-
build-depends: base < 4.22
137+
build-depends: base < 4.23
137138
, directory < 1.4
138-
, extra < 1.8
139+
, extra < 1.9
139140
, filepath < 1.6
140-
, ghc >= 9.12 && < 9.13
141-
, Diff < 0.6
141+
, ghc >= 9.14 && < 9.15
142+
, Diff < 1.1
142143
buildable: True
143144
else
144145
buildable: False

src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ lam_where k annsModule = fmap (\newAnns -> annsModule { am_where = newAnns })
947947
-- , importDeclAnnAs :: Maybe (EpToken "as") -- ^ The location of the @as@ keyword
948948
-- } deriving (Data)
949949

950-
951950
limportDeclAnnImport :: Lens EpAnnImportDecl (EpToken "import")
952951
limportDeclAnnImport k annImp = fmap (\new -> annImp { importDeclAnnImport = new })
953952
(k (importDeclAnnImport annImp))

0 commit comments

Comments
 (0)