Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GHC-9.12 #205

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 29 additions & 21 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.19.20240514
# version: 0.19.20250104
#
# REGENDATA ("0.19.20240514",["github","cabal.project"])
# REGENDATA ("0.19.20250104",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,19 +32,24 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.2
- compiler: ghc-9.8.4
compilerKind: ghc
compilerVersion: 9.8.2
compilerVersion: 9.8.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.5
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.5
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -79,15 +84,29 @@ jobs:
allow-failure: false
fail-fast: false
steps:
- name: apt
- name: apt-get install
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
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=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -98,21 +117,12 @@ jobs:
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$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=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -219,8 +229,6 @@ jobs:
echo "package these-tests" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: quickcheck-instances:base
allow-newer: quickcheck-instances:containers
EOF
$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
cat cabal.project
Expand Down Expand Up @@ -284,8 +292,8 @@ jobs:
cabal-plan topo | sort
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='monad-chronicle -semigroupoids' --constraint='semialign -semigroupoids' all
- name: save cache
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
3 changes: 0 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ packages: monad-chronicle
packages: these-tests

tests: true

allow-newer: quickcheck-instances:base
allow-newer: quickcheck-instances:containers
6 changes: 6 additions & 0 deletions monad-chronicle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.1

- Remove `disclose`. Use `dictate c >> return def` if you need it.
No more dependency of `data-default` or `data-default-class`.
This change is a consequence of change in `data-default-0.8.0.0`

# 1.0.2

- Support GHC-8.6.5...GHC-9.10.1
Expand Down
13 changes: 6 additions & 7 deletions monad-chronicle/monad-chronicle.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: >=1.10
name: monad-chronicle
version: 1.0.2
version: 1.1
synopsis: These as a transformer, ChronicleT
homepage: https://github.com/haskellari/these
license: BSD3
Expand All @@ -22,9 +22,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

source-repository head
type: git
Expand All @@ -46,16 +47,14 @@ library

-- ghc boot libs
build-depends:
base >=4.12.0.0 && <4.21
base >=4.12.0.0 && <4.22
, mtl >=2.2.2 && <2.4
, transformers >=0.5.6.2 && <0.7

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

-- other dependencies
build-depends:
data-default-class >=0.1.2.0 && <0.2
, transformers-compat >=0.6.5 && <0.8
build-depends: transformers-compat >=0.6.5 && <0.8

if flag(semigroupoids)
build-depends: semigroupoids >=6.0.1 && <6.1
10 changes: 0 additions & 10 deletions monad-chronicle/src/Control/Monad/Chronicle/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import Control.Monad.Trans.Error as Error

import Control.Monad (liftM)
import Control.Monad.Trans.Class (lift)
import Data.Default.Class
import Data.Semigroup
import Prelude

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

-- | @'disclose' c@ is an action that records the output @c@ and returns a
-- @'Default'@ value.
--
-- This is a convenience function for reporting non-fatal errors in one
-- branch a @case@, or similar scenarios when there is no meaningful
-- result but a placeholder of sorts is needed in order to continue.
disclose :: (Default a) => c -> m a
disclose c = dictate c >> return def

-- | @'confess' c@ is an action that ends with a final record @c@.
--
-- Equivalent to 'throwError' for the 'Error' monad.
Expand Down
12 changes: 1 addition & 11 deletions monad-chronicle/src/Control/Monad/Trans/Chronicle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module Control.Monad.Trans.Chronicle (
-- * The ChronicleT monad transformer
ChronicleT(..),
-- * Chronicle operations
dictate, disclose, confess,
dictate, confess,
memento, absolve, condemn,
retcon,
) where
Expand All @@ -28,7 +28,6 @@ import Control.Applicative
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Trans
import Data.Default.Class
import Data.Functor.Identity
import Data.Semigroup

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

-- | @'disclose' c@ is an action that records the output @c@ and returns a
-- @'Default'@ value.
--
-- This is a convenience function for reporting non-fatal errors in one
-- branch a @case@, or similar scenarios when there is no meaningful
-- result but a placeholder of sorts is needed in order to continue.
disclose :: (Default a, Semigroup c, Monad m) => c -> ChronicleT c m a
disclose c = dictate c >> return def

-- | @'confess' c@ is an action that ends with a final output @c@.
--
-- Equivalent to 'throwError' for the 'Error' monad.
Expand Down
7 changes: 4 additions & 3 deletions semialign/semialign.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

source-repository head
type: git
Expand Down Expand Up @@ -61,7 +62,7 @@ library

-- ghc boot libs
build-depends:
base >=4.12.0.0 && <4.21
base >=4.12.0.0 && <4.22
, containers >=0.6.0.1 && <0.8
, transformers >=0.5.6.2 && <0.7

Expand Down
8 changes: 5 additions & 3 deletions these-lens/these-lens.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cabal-version: >=1.10
name: these-lens
version: 1.0.2
x-revision: 1
synopsis: Lenses for These
homepage: https://github.com/haskellari/these
license: BSD3
Expand All @@ -18,9 +19,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

source-repository head
type: git
Expand All @@ -34,7 +36,7 @@ library
exposed-modules: Data.These.Lens

-- ghc boot libs
build-depends: base >=4.12.0.0 && <4.21
build-depends: base >=4.12.0.0 && <4.22
build-depends: these >=1.2.1 && <1.3

-- other dependencies
Expand Down
8 changes: 5 additions & 3 deletions these-optics/these-optics.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cabal-version: >=1.10
name: these-optics
version: 1.0.2
x-revision: 1
synopsis: Optics for These
homepage: https://github.com/haskellari/these
license: BSD3
Expand All @@ -18,9 +19,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

source-repository head
type: git
Expand All @@ -34,7 +36,7 @@ library
exposed-modules: Data.These.Optics

-- ghc boot libs
build-depends: base >=4.12 && <4.21
build-depends: base >=4.12 && <4.22

-- these
build-depends: these >=1.2.1 && <1.3
Expand Down
9 changes: 5 additions & 4 deletions these-tests/these-tests.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

source-repository head
type: git
Expand Down Expand Up @@ -50,7 +51,7 @@ test-suite test
-- library constrained dependencies
build-depends:
assoc
, base
, base <5
, binary
, containers
, hashable
Expand All @@ -70,5 +71,5 @@ test-suite test
lattices >=2.2.1 && <2.3
, quickcheck-instances >=0.3.23 && <0.4
, tasty >=1.2 && <1.6
, tasty-quickcheck >=0.10 && <0.11
, tasty-quickcheck >=0.11 && <0.12
, transformers-compat >=0.6.5 && <0.8
9 changes: 5 additions & 4 deletions these/these.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: >=1.10
name: these
version: 1.2.1
x-revision: 1
x-revision: 2
synopsis: An either-or-both data type.
homepage: https://github.com/haskellari/these
license: BSD3
Expand Down Expand Up @@ -38,9 +38,10 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.5
|| ==9.8.2
|| ==9.6.6
|| ==9.8.4
|| ==9.10.1
|| ==9.12.1

source-repository head
type: git
Expand All @@ -58,7 +59,7 @@ library

-- ghc boot libs
build-depends:
base >=4.12.0.0 && <4.21
base >=4.12.0.0 && <4.22
, binary >=0.8.6.0 && <0.10
, deepseq >=1.4.4.0 && <1.6

Expand Down