Skip to content

Commit

Permalink
Merge pull request #115 from alanz/ghc-9.4
Browse files Browse the repository at this point in the history
Support GHC 9.4.1 and GHC 9.4.2
  • Loading branch information
alanz authored Oct 2, 2022
2 parents d9cb006 + 8d3f0aa commit 3b36f5d
Show file tree
Hide file tree
Showing 26 changed files with 692 additions and 1,187 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.14.3
# version: 0.15.20220920
#
# REGENDATA ("0.14.3",["github","ghc-exactprint.cabal","--ghcup-jobs"])
# REGENDATA ("0.15.20220920",["github","ghc-exactprint.cabal","--ghcup-jobs"])
#
name: Haskell-CI
on:
Expand All @@ -19,7 +19,7 @@ on:
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes:
60
container:
Expand All @@ -28,14 +28,14 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.2.2
- compiler: ghc-9.4.2
compilerKind: ghc
compilerVersion: 9.2.2
compilerVersion: 9.4.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.1
- compiler: ghc-9.4.1
compilerKind: ghc
compilerVersion: 9.2.1
compilerVersion: 9.4.1
setup-method: ghcup
allow-failure: false
fail-fast: false
Expand All @@ -45,10 +45,10 @@ jobs:
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ packages
/.vscode/
/cabal.project.local~0
/cabal.project.local~1
/cabal.project.local~2
/cabal.project.local~3
/cpp-grep-cooked.txt
/cpp-grep-raw.txt
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2022-09-30 v1.6.0
* Support GHC 9.4.1 and GHC 9.4.2
2022-02-01 v1.5.0
* Add private version of showAstData, to be able to render
AnchorOperation's hacked into SrcSpan's.
Expand Down
20 changes: 10 additions & 10 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
packages: .

-- repository head.hackage.ghc.haskell.org
-- url: https://ghc.gitlab.haskell.org/head.hackage/
-- secure: True
-- key-threshold: 3
-- root-keys:
-- f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
-- 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
-- 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
key-threshold: 3
root-keys:
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329

-- optional-packages: packages/*/*.cabal

Expand All @@ -18,8 +18,8 @@ packages: .
-- $ cp ${WhereThisGitHubRepoIsCloned}/patches/$PKGID.cabal ./*.cabal
-- $ cd ../..

-- allow-newer:
-- ghc-paths:Cabal
allow-newer:
ghc-paths:Cabal

package ghc-exactprint
test-show-details: direct
Expand Down
14 changes: 13 additions & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,17 @@ rm -fr dist*
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.2.1 --allow-newer
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.2.1
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=ghc-9.2.2
# cabal configure -fdev --enable-tests --with-compiler=ghc-9.2.4

cabal configure -fdev -froundtrip --enable-tests

#--------------------------------------------------------------------
#- GHC 9.4 HEAD
# cabal configure -fdev -froundtrip --enable-tests --with-compiler=/opt/ghc/9.3.0/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.3.0/bin/ghc --allow-newer
# cabal configure -fdev --with-compiler=/opt/ghc/9.3.0/bin/ghc --allow-newer
# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.3.20220407/bin/ghc --allow-newer

# cabal configure -fdev --enable-tests --with-compiler=/opt/ghc/9.4.0.20220523/bin/ghc --allow-newer


cabal configure -fdev --enable-tests --with-compiler=ghc-9.4.2
32 changes: 16 additions & 16 deletions ghc-exactprint.cabal
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: ghc-exactprint
version: 1.5.0
version: 1.6.0
synopsis: ExactPrint for GHC
description: Using the API Annotations available from GHC 9.2.1, this
library provides a means to round trip any code that can
be compiled by GHC, currently excluding lhs files.
.
Note: requires GHC 9.2 or later. For GHC versions from
7.10.2 to 9.0.* see this library with versions < 1.1
Note: requires GHC 9.4.*. For earlier GHC
versions see lower version numbers.
.

license: BSD3
Expand All @@ -15,8 +15,8 @@ author: Alan Zimmerman, Matthew Pickering
maintainer: [email protected]
category: Development
build-type: Simple
tested-with: GHC == 9.2.1
, GHC == 9.2.2
tested-with: GHC == 9.4.1
, GHC == 9.4.2
extra-source-files: ChangeLog
tests/examples/failing/*.hs
tests/examples/ghc710-only/*.hs
Expand All @@ -29,6 +29,7 @@ extra-source-files: ChangeLog
tests/examples/ghc88/*.hs
tests/examples/ghc90/*.hs
tests/examples/ghc92/*.hs
tests/examples/ghc94/*.hs
tests/examples/pre-ghc810/*.hs
tests/examples/pre-ghc86/*.hs
tests/examples/pre-ghc90/*.hs
Expand Down Expand Up @@ -72,15 +73,14 @@ library
-- other-extensions:
GHC-Options: -Wall -Wredundant-constraints
-- GHC-Options: -Weverything
build-depends: base >=4.16 && <4.18
build-depends: base >=4.17 && <4.18
, bytestring >= 0.10.6
, containers >= 0.5
, ordered-containers
, data-default
, directory >= 1.2
, filepath >= 1.4
, ghc >= 9.2.1
, ghc-paths >= 0.1
, ghc >= 9.4.1
, mtl >= 2.2.1
, syb >= 0.5
, free >= 4.12
Expand All @@ -89,7 +89,7 @@ library


default-language: Haskell2010
if impl (ghc < 9.2)
if impl (ghc < 9.4)
buildable: False

Test-Suite test
Expand All @@ -107,8 +107,6 @@ Test-Suite test
, Test.Transform
GHC-Options: -threaded -Wall -Wredundant-constraints
Default-language: Haskell2010
if impl (ghc < 9.2)
buildable: False
Build-depends: HUnit >= 1.2
, base < 4.18
, bytestring
Expand All @@ -118,7 +116,7 @@ Test-Suite test
, Diff
, directory >= 1.2
, filepath >= 1.4
, ghc >= 9.2.1
, ghc >= 9.4.1
, ghc-paths >= 0.1
, mtl >= 2.2.1
, syb >= 0.5
Expand All @@ -127,10 +125,13 @@ Test-Suite test
-- for the lib only
, fail >= 4.9 && <4.10
, ghc-boot
, Cabal-syntax
if flag (dev)
build-depends: free
else
build-depends: ghc-exactprint
if impl (ghc < 9.4)
buildable: False

executable roundtrip
main-is: Roundtrip.hs
Expand All @@ -139,7 +140,7 @@ executable roundtrip
Test.CommonUtils
-- Test.Consistency
default-language: Haskell2010
if impl (ghc >= 9.2) && flag (roundtrip)
if impl (ghc >= 9.4) && flag (roundtrip)
build-depends:
HUnit
, base
Expand All @@ -149,7 +150,7 @@ executable roundtrip
, filepath
, ghc
, ghc-exactprint
, ghc-paths
-- , ghc-paths
, syb
, temporary
, time
Expand Down Expand Up @@ -186,8 +187,7 @@ executable prepare-hackage
, directory
, filemanip
, filepath
, ghc >= 9.2.1
, ghc-paths >= 0.1
, ghc >= 9.4.1
, HUnit
, text >= 1.2.2
, turtle >= 1.3.0
Expand Down
4 changes: 0 additions & 4 deletions src/Language/Haskell/GHC/ExactPrint/Dump.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
`extQ` annotationAddEpAnn
`extQ` annotationGrhsAnn
`extQ` annotationEpAnnHsCase
`extQ` annotationEpAnnHsLet
`extQ` annotationAnnList
`extQ` annotationEpAnnImportDecl
`extQ` annotationAnnParen
Expand Down Expand Up @@ -240,9 +239,6 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
annotationEpAnnHsCase :: EpAnn EpAnnHsCase -> SDoc
annotationEpAnnHsCase = annotation' (text "EpAnn EpAnnHsCase")

annotationEpAnnHsLet :: EpAnn AnnsLet -> SDoc
annotationEpAnnHsLet = annotation' (text "EpAnn AnnsLet")

annotationAnnList :: EpAnn AnnList -> SDoc
annotationAnnList = annotation' (text "EpAnn AnnList")

Expand Down
Loading

0 comments on commit 3b36f5d

Please sign in to comment.