Skip to content

Commit

Permalink
Merge pull request #499 from ysangkok/janus/ghc-9.8
Browse files Browse the repository at this point in the history
Allow GHC-9.8, upgrade tested-with, haskell-ci
  • Loading branch information
adamgundry authored Nov 16, 2023
2 parents 646db47 + 3ee3632 commit 9cdb696
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 30 deletions.
37 changes: 22 additions & 15 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.16.3
# version: 0.17.20231110
#
# REGENDATA ("0.16.3",["github","--config=cabal.haskell-ci","cabal.project"])
# REGENDATA ("0.17.20231110",["github","--config=cabal.haskell-ci","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -37,14 +37,19 @@ jobs:
compilerVersion: "8.4"
setup-method: hvr-ppa
allow-failure: false
- compiler: ghc-9.6.2
- compiler: ghc-9.8.1
compilerKind: ghc
compilerVersion: 9.6.2
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.5
- compiler: ghc-9.6.3
compilerKind: ghc
compilerVersion: 9.4.5
compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.8
Expand Down Expand Up @@ -103,10 +108,10 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'ppa:hvr/ghcjs' ; fi
Expand All @@ -115,9 +120,9 @@ jobs:
apt-get update
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-get install -y "$HCNAME" ghc-8.4.4 nodejs ; else apt-get install -y "$HCNAME" ; fi
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
HCKIND: ${{ matrix.compilerKind }}
Expand All @@ -132,17 +137,19 @@ jobs:
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
Expand Down
2 changes: 1 addition & 1 deletion indexed-profunctors/indexed-profunctors.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-type: Simple
maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Utilities for indexed profunctors
category: Data, Optics, Lenses, Profunctors
description:
Expand Down
2 changes: 1 addition & 1 deletion metametapost/metametapost.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license: BSD-3-Clause
license-file: LICENSE
build-type: Simple
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
maintainer: [email protected]
synopsis: Generate optics documentation diagrams
category: Optics, Examples
Expand Down
2 changes: 1 addition & 1 deletion optics-core/optics-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-type: Simple
maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Optics as an abstract interface: core definitions
category: Data, Optics, Lenses
description:
Expand Down
6 changes: 3 additions & 3 deletions optics-extra/optics-extra.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-type: Simple
maintainer: [email protected]
author: Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Extra utilities and instances for optics-core
category: Data, Optics, Lenses
description:
Expand Down Expand Up @@ -63,13 +63,13 @@ library

build-depends: base >= 4.10 && <5
, array >= 0.5.2.0 && <0.6
, bytestring >= 0.10.8 && <0.12
, bytestring >= 0.10.8 && <0.13
, containers >= 0.5.10.2 && <0.7
, hashable >= 1.1.1 && <1.5
, indexed-profunctors >= 0.1 && <0.2
, mtl >= 2.2.2 && <2.4
, optics-core >= 0.4.1 && <0.4.2
, text >= 1.2 && <1.3 || >=2.0 && <2.1
, text >= 1.2 && <1.3 || >=2.0 && <2.2
, transformers >= 0.5 && <0.7
, unordered-containers >= 0.2.6 && <0.3
, vector >= 0.11 && <0.14
Expand Down
2 changes: 1 addition & 1 deletion optics-sop/optics-sop.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-type: Simple
maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Optics for generics-sop, and using generics-sop
category: Data, Optics, Lenses, Generics
description:
Expand Down
4 changes: 2 additions & 2 deletions optics-th/optics-th.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-type: Simple
maintainer: [email protected]
author: Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Optics construction using TemplateHaskell
category: Data, Optics, Lenses
description:
Expand Down Expand Up @@ -64,7 +64,7 @@ library
, containers >= 0.5.10.2 && <0.7
, mtl >= 2.2.2 && <2.4
, optics-core >= 0.4.1 && <0.5
, template-haskell >= 2.12 && <2.21
, template-haskell >= 2.12 && <2.22
, th-abstraction >= 0.4 && <0.7
, transformers >= 0.5 && <0.7

Expand Down
2 changes: 1 addition & 1 deletion optics-vl/optics-vl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-type: Simple
maintainer: [email protected]
author: Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Utilities for compatibility with van Laarhoven optics
category: Data, Optics, Lenses
description:
Expand Down
2 changes: 1 addition & 1 deletion optics/optics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-type: Simple
maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Optics as an abstract interface
category: Data, Optics, Lenses
description:
Expand Down
34 changes: 33 additions & 1 deletion template-haskell-optics/src/Language/Haskell/TH/Optics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,11 @@ typeFamilyHeadName = lens g s where
g (TypeFamilyHead n _ _ _ ) = n
s (TypeFamilyHead _ tvbs rs ia) n = TypeFamilyHead n tvbs rs ia

#if MIN_VERSION_template_haskell(2,21,0)
typeFamilyHeadTyVarBndrs :: Lens' TypeFamilyHead [TyVarBndr BndrVis]
#else
typeFamilyHeadTyVarBndrs :: Lens' TypeFamilyHead [TyVarBndrUnit]
#endif
typeFamilyHeadTyVarBndrs = lens g s where
g (TypeFamilyHead _ tvbs _ _ ) = tvbs
s (TypeFamilyHead n _ rs ia) tvbs = TypeFamilyHead n tvbs rs ia
Expand Down Expand Up @@ -834,15 +838,23 @@ _ValD
remitter (ValD x y z) = Just (x, y, z)
remitter _ = Nothing

#if MIN_VERSION_template_haskell(2,21,0)
_TySynD :: Prism' Dec (Name, [TyVarBndr BndrVis], Type)
#else
_TySynD :: Prism' Dec (Name, [TyVarBndrUnit], Type)
#endif
_TySynD
= prism' reviewer remitter
where
reviewer (x, y, z) = TySynD x y z
remitter (TySynD x y z) = Just (x, y, z)
remitter _ = Nothing

#if MIN_VERSION_template_haskell(2,21,0)
_ClassD :: Prism' Dec (Cxt, Name, [TyVarBndr BndrVis], [FunDep], [Dec])
#else
_ClassD :: Prism' Dec (Cxt, Name, [TyVarBndrUnit], [FunDep], [Dec])
#endif
_ClassD
= prism' reviewer remitter
where
Expand Down Expand Up @@ -988,7 +1000,15 @@ _ClosedTypeFamilyD
-- _DataInstD :: 'Prism'' 'Dec' ('Cxt', 'Maybe' ['TyVarBndrUnit'], 'Type', 'Maybe' 'Kind', ['Con'], ['DerivClause']) -- template-haskell-2.15+
-- _DataInstD :: 'Prism'' 'Dec' ('Cxt', 'Name', ['Type'], 'Maybe' 'Kind', ['Con'], ['DerivClause']) -- Earlier versions
-- @
#if MIN_VERSION_template_haskell(2,15,0)
#if MIN_VERSION_template_haskell(2,21,0)
_DataInstD :: Prism' Dec (Cxt, Maybe [TyVarBndr ()], Type, Maybe Kind, [Con], [DerivClause])
_DataInstD
= prism' reviewer remitter
where
reviewer (x, y, z, w, u, v) = DataInstD x y z w u v
remitter (DataInstD x y z w u v) = Just (x, y, z, w, u, v)
remitter _ = Nothing
#elif MIN_VERSION_template_haskell(2,15,0)
_DataInstD :: Prism' Dec (Cxt, Maybe [TyVarBndrUnit], Type, Maybe Kind, [Con], [DerivClause])
_DataInstD
= prism' reviewer remitter
Expand Down Expand Up @@ -1029,23 +1049,35 @@ _NewtypeInstD
remitter _ = Nothing
#endif

#if MIN_VERSION_template_haskell(2,21,0)
_DataD :: Prism' Dec (Cxt, Name, [TyVarBndr BndrVis], Maybe Kind, [Con], [DerivClause])
#else
_DataD :: Prism' Dec (Cxt, Name, [TyVarBndrUnit], Maybe Kind, [Con], [DerivClause])
#endif
_DataD
= prism' reviewer remitter
where
reviewer (x, y, z, w, u, v) = DataD x y z w u v
remitter (DataD x y z w u v) = Just (x, y, z, w, u, v)
remitter _ = Nothing

#if MIN_VERSION_template_haskell(2,21,0)
_NewtypeD :: Prism' Dec (Cxt, Name, [TyVarBndr BndrVis], Maybe Kind, Con, [DerivClause])
#else
_NewtypeD :: Prism' Dec (Cxt, Name, [TyVarBndrUnit], Maybe Kind, Con, [DerivClause])
#endif
_NewtypeD
= prism' reviewer remitter
where
reviewer (x, y, z, w, u, v) = NewtypeD x y z w u v
remitter (NewtypeD x y z w u v) = Just (x, y, z, w, u, v)
remitter _ = Nothing

#if MIN_VERSION_template_haskell(2,21,0)
_DataFamilyD :: Prism' Dec (Name, [TyVarBndr BndrVis], Maybe Kind)
#else
_DataFamilyD :: Prism' Dec (Name, [TyVarBndrUnit], Maybe Kind)
#endif
_DataFamilyD
= prism' reviewer remitter
where
Expand Down
6 changes: 3 additions & 3 deletions template-haskell-optics/template-haskell-optics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ maintainer: [email protected]
author: Andrzej Rybczak
cabal-version: 1.18
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.5 || ==9.6.2, GHCJS ==8.4
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1, GHCJS ==8.4
synopsis: Optics for template-haskell types
category: Data, Optics, Lenses
description:
Expand All @@ -32,7 +32,7 @@ library
build-depends: base >= 4.10 && <5
, optics-core >= 0.4 && <0.5
, containers >= 0.5.10.2 && <0.7
, template-haskell >= 2.12 && <2.21
, th-abstraction >= 0.4 && <0.6
, template-haskell >= 2.12 && <2.22
, th-abstraction >= 0.4 && <0.7

exposed-modules: Language.Haskell.TH.Optics

0 comments on commit 9cdb696

Please sign in to comment.