From 4512b9aa73e6693c1bf2bcc69103010a46d71ef8 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Tue, 14 Jan 2025 14:27:20 +1100 Subject: [PATCH 1/4] Make it build with ghc 9.12 --- cabal.project | 13 ++++++++++++- io-classes/io-classes.cabal | 12 ++++++------ io-sim/io-sim.cabal | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/cabal.project b/cabal.project index 765dda97..6c63f484 100644 --- a/cabal.project +++ b/cabal.project @@ -1,4 +1,4 @@ -index-state: hackage.haskell.org 2024-05-17T03:42:00Z +index-state: hackage.haskell.org 2025-01-14T02:09:49Z packages: ./io-sim ./io-classes @@ -11,3 +11,14 @@ package io-classes package strict-stm flags: +asserts + +if impl (ghc >= 9.12) + allow-newer: + -- Stuck on `cabal-3.14` issues and recalcitrant maintainers + -- https://github.com/haskell/aeson/issues/1124 + , aeson:ghc-prim + , aeson:template-haskell + + -- Fix blocked by aeson + -- https://github.com/haskellari/microstache/issues/43 + , microstache:base diff --git a/io-classes/io-classes.cabal b/io-classes/io-classes.cabal index 740f1293..41a26940 100644 --- a/io-classes/io-classes.cabal +++ b/io-classes/io-classes.cabal @@ -112,7 +112,7 @@ library TypeFamilyDependencies TypeOperators UndecidableInstances - build-depends: base >=4.9 && <4.21, + build-depends: base >=4.9 && <4.22, array, async >=2.1, bytestring, @@ -140,7 +140,7 @@ library strict-stm reexported-modules: Control.Concurrent.Class.MonadSTM.TSem as Control.Concurrent.Class.MonadSTM.Strict.TSem default-language: Haskell2010 default-extensions: ImportQualifiedPost - build-depends: base >= 4.9 && <4.21, + build-depends: base >= 4.9 && <4.22, array, stm >= 2.5 && <2.6, @@ -163,7 +163,7 @@ library strict-mvar exposed-modules: Control.Concurrent.Class.MonadMVar.Strict default-language: Haskell2010 default-extensions: ImportQualifiedPost - build-depends: base >= 4.9 && <4.21, + build-depends: base >= 4.9 && <4.22, io-classes:io-classes, ghc-options: -Wall -Wno-unticked-promoted-constructors @@ -190,7 +190,7 @@ library si-timers NumericUnderscores, ScopedTypeVariables, TypeFamilies - build-depends: base >=4.9 && <4.21, + build-depends: base >=4.9 && <4.22, deepseq, mtl, nothunks, @@ -214,7 +214,7 @@ library mtl , Control.Monad.Class.MonadTime.SI.Trans , Control.Monad.Class.MonadTimer.Trans , Control.Monad.Class.MonadTimer.SI.Trans - build-depends: base >=4.9 && <4.21, + build-depends: base >=4.9 && <4.22, array, mtl, @@ -231,7 +231,7 @@ library testlib exposed-modules: Test.Control.Concurrent.Class.MonadMVar.Strict.WHNF default-language: Haskell2010 default-extensions: ImportQualifiedPost - build-depends: base >=4.9 && <4.21, + build-depends: base >=4.9 && <4.22, nothunks, QuickCheck, io-classes:strict-mvar diff --git a/io-sim/io-sim.cabal b/io-sim/io-sim.cabal index 56264869..b663330f 100644 --- a/io-sim/io-sim.cabal +++ b/io-sim/io-sim.cabal @@ -79,7 +79,7 @@ library RankNTypes, ScopedTypeVariables, TypeFamilies - build-depends: base >=4.9 && <4.21, + build-depends: base >=4.9 && <4.22, io-classes:{io-classes,strict-stm,si-timers} ^>=1.6 || ^>= 1.7, exceptions >=0.10, From d6fa219478cd4893f8cbd55e42f45ae04dbaefcb Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Tue, 14 Jan 2025 14:30:58 +1100 Subject: [PATCH 2/4] CI: Add ghc-9.12 to the build matrix --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 08ff08bb..34ae75bf 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ["8.10", "9.2", "9.4", "9.6", "9.8", "9.10"] + ghc: ["8.10", "9.2", "9.4", "9.6", "9.8", "9.10", "9.12"] os: [ubuntu-latest, macos-latest, windows-latest] defaults: From e5adb8d3d8525439475de1b21e0fc9f64d9ec9ee Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Tue, 14 Jan 2025 14:46:41 +1100 Subject: [PATCH 3/4] Update CHANGELOG files --- io-classes/CHANGELOG.md | 2 ++ io-sim/CHANGELOG.md | 1 + 2 files changed, 3 insertions(+) diff --git a/io-classes/CHANGELOG.md b/io-classes/CHANGELOG.md index 2c46312f..294f3311 100644 --- a/io-classes/CHANGELOG.md +++ b/io-classes/CHANGELOG.md @@ -2,6 +2,8 @@ ### next version +* Support ghc-9.12 + ### Breaking changes * Added `threadLabel` to `MonadThread` diff --git a/io-sim/CHANGELOG.md b/io-sim/CHANGELOG.md index 26dcaa99..2956a9e8 100644 --- a/io-sim/CHANGELOG.md +++ b/io-sim/CHANGELOG.md @@ -24,6 +24,7 @@ than one that finishes with `SimResult`. - More polymorphic `ppTrace_` type signature. - Fixed `tryReadTBQueue` when returning `Nothing`. +- Support ghc 9.12 ## 1.6.0.0 From c913ce8099589402cbca8a89250296c2fc3cf7dd Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Tue, 14 Jan 2025 14:51:09 +1100 Subject: [PATCH 4/4] Remove derived Typeable instances --- io-classes/src/Control/Monad/Class/MonadSTM/Internal.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/io-classes/src/Control/Monad/Class/MonadSTM/Internal.hs b/io-classes/src/Control/Monad/Class/MonadSTM/Internal.hs index 65d220e9..95f1875b 100644 --- a/io-classes/src/Control/Monad/Class/MonadSTM/Internal.hs +++ b/io-classes/src/Control/Monad/Class/MonadSTM/Internal.hs @@ -1030,7 +1030,6 @@ unGetTBQueueDefault (TBQueue rsize read wsize _write _size) a = do -- | Default implementation of 'TArray'. -- data TArrayDefault m i e = TArray (Array i (TVar m e)) - deriving Typeable deriving instance (Eq (TVar m e), Ix i) => Eq (TArrayDefault m i e)