diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index ed460e2..2c5f22d 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20250506 +# version: 0.19.20260104 # -# REGENDATA ("0.19.20250506",["github","cabal.project"]) +# REGENDATA ("0.19.20260104",["github","cabal.project"]) # name: Haskell-CI on: @@ -20,6 +20,9 @@ on: pull_request: branches: - master + merge_group: + branches: + - master jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} @@ -32,14 +35,19 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.14.1 + compilerKind: ghc + compilerVersion: 9.14.1 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.12.2 compilerKind: ghc compilerVersion: 9.12.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.10.2 + - compiler: ghc-9.10.3 compilerKind: ghc - compilerVersion: 9.10.2 + compilerVersion: 9.10.3 setup-method: ghcup allow-failure: false - compiler: ghc-9.8.4 @@ -111,8 +119,8 @@ jobs: chmod a+x "$HOME/.ghcup/bin/ghcup" - name: Install cabal-install run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" - name: Install GHC (GHCup) if: matrix.setup-method == 'ghcup' run: | @@ -188,7 +196,7 @@ jobs: chmod a+x $HOME/.cabal/bin/cabal-plan cabal-plan --version - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: path: source - name: initial cabal.project for sdist @@ -225,18 +233,24 @@ jobs: echo "packages: ${PKGDIR_test_framework_quickcheck2}" >> cabal.project echo "packages: ${PKGDIR_test_framework_example}" >> cabal.project if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package test-framework" >> cabal.project ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package test-framework-hunit" >> cabal.project ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package test-framework-quickcheck2" >> cabal.project ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package test-framework-example" >> cabal.project ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package test-framework" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package test-framework-hunit" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package test-framework-quickcheck2" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package test-framework-example" >> cabal.project ; fi + if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi cat >> cabal.project <> cabal.project.local cat cabal.project @@ -281,16 +295,6 @@ jobs: run: | rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: prepare for constraint sets - run: | - rm -f cabal.project.local - - name: constraint set containers-0.8 - run: | - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>=0.8' all --dry-run ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>=0.8' --dependencies-only -j2 all ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>=0.8' all ; fi - if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers ^>=0.8' all ; fi - name: save cache if: always() uses: actions/cache/save@v4 diff --git a/cabal.haskell-ci b/cabal.haskell-ci index cf5828c..b363793 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -2,16 +2,9 @@ branches: master apt: libxml2-dev +error-incomplete-patterns: False + raw-project -- On Debian/Ubuntu you may need the following to workaround an issue in libxml's packaging package libxml extra-include-dirs: /usr/include/libxml2 - -constraint-set containers-0.8 - ghc: >= 8.2 - constraints: containers ^>=0.8 - tests: True - run-tests: True - -raw-project - allow-newer: containers diff --git a/cabal.project b/cabal.project index 0248eb4..50ed9e9 100644 --- a/cabal.project +++ b/cabal.project @@ -17,3 +17,6 @@ program-options -Wno-deprecations -- This package is legacy and won't address deprecation warnings. -Wno-x-partial + -Wunused-packages + -Wincomplete-patterns + -Wincomplete-uni-patterns diff --git a/core/ChangeLog.md b/core/ChangeLog.md index 8385181..a4bb6e0 100644 --- a/core/ChangeLog.md +++ b/core/ChangeLog.md @@ -1,3 +1,10 @@ +#### 0.8.2.3 + +_2026-01-05, Andreas Abel_ + +- Remove obsolete `deriving Typeable` +- Tested building with GHC 8.0 - 9.14.1 + #### 0.8.2.2 _2025-04-11, Andreas Abel_ diff --git a/core/src/Test/Framework/Core.hs b/core/src/Test/Framework/Core.hs index 9f96900..79008a1 100644 --- a/core/src/Test/Framework/Core.hs +++ b/core/src/Test/Framework/Core.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE UndecidableInstances, DeriveDataTypeable #-} +{-# LANGUAGE UndecidableInstances #-} + module Test.Framework.Core where import Test.Framework.Improving @@ -59,9 +60,7 @@ buildTest mx = BuildTestBracketed (fmap (flip (,) (return ())) mx) buildTestBracketed :: IO (Test, IO ()) -> Test buildTestBracketed = BuildTestBracketed - data MutuallyExcluded t = ME (MVar ()) t - deriving Typeable -- This requires UndecidableInstances, but I think it can't be made inconsistent? instance Testlike i r t => Testlike i r (MutuallyExcluded t) where diff --git a/core/test-framework.cabal b/core/test-framework.cabal index 0125aa4..b6bf191 100644 --- a/core/test-framework.cabal +++ b/core/test-framework.cabal @@ -1,7 +1,6 @@ Cabal-Version: 1.18 Name: test-framework -Version: 0.8.2.2 -x-revision: 1 +Version: 0.8.2.3 Category: Testing Synopsis: Framework for running and organising tests, with HUnit and QuickCheck support @@ -17,8 +16,9 @@ Bug-Reports: https://github.com/haskell/test-framework/issues Build-Type: Simple Tested-With: + GHC == 9.14.1 GHC == 9.12.2 - GHC == 9.10.2 + GHC == 9.10.3 GHC == 9.8.4 GHC == 9.6.7 GHC == 9.4.8 @@ -68,8 +68,7 @@ Library , random >= 1.1 && < 1.4 , containers >= 0.5.7 && < 1 , regex-posix >= 0.95.2 && < 0.97 - , old-locale >= 1.0 && < 1.1 - , time >= 1.6 && < 1.15 + , time >= 1.6 && < 2 , xml >= 1.3.14 && < 1.4 , hostname >= 1.0 && < 1.1 @@ -117,15 +116,8 @@ Test-Suite test-framework-tests , base >= 4.9 && < 5 , random >= 1.1 , containers >= 0.5.7 - , ansi-terminal >= 0.6.3 - , ansi-wl-pprint >= 0.6.7 , regex-posix >= 0.95.2 - , old-locale >= 1.0 - , time >= 1.6 , xml >= 1.3.14 - , hostname >= 1.0 - , bytestring >= 0.10.8 - , semigroups >= 0.18 Default-Language: Haskell2010 Default-Extensions: CPP diff --git a/example/test-framework-example.cabal b/example/test-framework-example.cabal index 86f25fa..8abbac7 100644 --- a/example/test-framework-example.cabal +++ b/example/test-framework-example.cabal @@ -12,8 +12,9 @@ Homepage: https://github.com/haskell/test-framework#readme Build-Type: Simple Tested-With: + GHC == 9.14.1 GHC == 9.12.2 - GHC == 9.10.2 + GHC == 9.10.3 GHC == 9.8.4 GHC == 9.6.7 GHC == 9.4.8 diff --git a/hunit/ChangeLog.md b/hunit/ChangeLog.md new file mode 100644 index 0000000..8df1e57 --- /dev/null +++ b/hunit/ChangeLog.md @@ -0,0 +1,7 @@ +## 0.3.0.3 + +_2026-01-05, Andreas Abel_ + +- Drop support for GHC 7 +- Remove obsolete `deriving Typeable` +- Tested building with GHC 8.0 - 9.14.1 diff --git a/hunit/Test/Framework/Providers/HUnit.hs b/hunit/Test/Framework/Providers/HUnit.hs index 1807942..fd2644c 100644 --- a/hunit/Test/Framework/Providers/HUnit.hs +++ b/hunit/Test/Framework/Providers/HUnit.hs @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE DeriveDataTypeable #-} + -- | Allows HUnit test cases to be used with the test-framework package. -- -- For an example of how to use test-framework, please see @@ -13,8 +13,6 @@ import Test.Framework.Providers.API import qualified Test.HUnit.Base import Test.HUnit.Lang -import Data.Typeable (Typeable) - -- | Create a 'Test' for a HUnit 'Assertion' testCase :: TestName -> Assertion -> Test testCase name = Test name . TestCase @@ -57,9 +55,7 @@ testCaseSucceeded :: TestCaseResult -> Bool testCaseSucceeded TestCasePassed = True testCaseSucceeded _ = False - newtype TestCase = TestCase Assertion - deriving Typeable instance Testlike TestCaseRunning TestCaseResult TestCase where runTest topts (TestCase assertion) = runTestCase topts assertion diff --git a/hunit/test-framework-hunit.cabal b/hunit/test-framework-hunit.cabal index 259d022..9cd6ca4 100644 --- a/hunit/test-framework-hunit.cabal +++ b/hunit/test-framework-hunit.cabal @@ -1,6 +1,6 @@ Cabal-Version: 1.18 Name: test-framework-hunit -Version: 0.3.0.2 +Version: 0.3.0.3 Category: Testing Synopsis: HUnit support for the test-framework package. License: BSD3 @@ -12,9 +12,13 @@ Bug-Reports: https://github.com/haskell/test-framework/issues Build-Type: Simple Description: @HUnit@ support for the @test-framework@ package. +extra-doc-files: + ChangeLog.md + Tested-With: + GHC == 9.14.1 GHC == 9.12.2 - GHC == 9.10.2 + GHC == 9.10.3 GHC == 9.8.4 GHC == 9.6.7 GHC == 9.4.8 diff --git a/quickcheck/Test/Framework/Providers/QuickCheck.hs b/quickcheck/Test/Framework/Providers/QuickCheck.hs index 62c3292..58788e2 100644 --- a/quickcheck/Test/Framework/Providers/QuickCheck.hs +++ b/quickcheck/Test/Framework/Providers/QuickCheck.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE DeriveDataTypeable #-} -- | Allows QuickCheck1 properties to be used with the test-framework package. -- -- For an example of how to use test-framework, please see @@ -61,7 +60,6 @@ propertySucceeded (PropertyResult { pr_status = status, pr_tests_run = mb_n }) = data Property = forall a. Testable a => Property a - deriving Typeable instance Testlike PropertyTestCount PropertyResult Property where runTest topts (Property testable) = runProperty topts testable diff --git a/quickcheck2/ChangeLog.md b/quickcheck2/ChangeLog.md index 670cd35..89d5e05 100644 --- a/quickcheck2/ChangeLog.md +++ b/quickcheck2/ChangeLog.md @@ -1,3 +1,10 @@ +## 0.3.0.7 + +_2026-01-05, Andreas Abel_ + +- Remove obsolete `deriving Typeable` +- Tested building with GHC 8.0 - 9.14.1 + ## 0.3.0.6 _2025-02-26, Andreas Abel_ diff --git a/quickcheck2/Test/Framework/Providers/QuickCheck2.hs b/quickcheck2/Test/Framework/Providers/QuickCheck2.hs index d1a0e0a..7c70182 100644 --- a/quickcheck2/Test/Framework/Providers/QuickCheck2.hs +++ b/quickcheck2/Test/Framework/Providers/QuickCheck2.hs @@ -1,5 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} @@ -20,8 +19,6 @@ import Test.QuickCheck.Test import Test.QuickCheck.Random (QCGen, mkQCGen) import System.Random (randomIO) -import Data.Typeable (Typeable) - -- | Create a 'Test' for a QuickCheck2 'Testable' property testProperty :: Testable a => TestName -> a -> Test @@ -73,7 +70,6 @@ propertySucceeded (PropertyResult { pr_status = status, pr_tests_run = mb_n }) = data Property = forall a. Testable a => Property a - deriving Typeable instance Testlike PropertyTestCount PropertyResult Property where runTest topts (Property testable) = runProperty topts testable diff --git a/quickcheck2/test-framework-quickcheck2.cabal b/quickcheck2/test-framework-quickcheck2.cabal index 0847fe7..edebbe7 100644 --- a/quickcheck2/test-framework-quickcheck2.cabal +++ b/quickcheck2/test-framework-quickcheck2.cabal @@ -1,7 +1,6 @@ Cabal-Version: 1.18 Name: test-framework-quickcheck2 -Version: 0.3.0.6 -x-revision: 1 +Version: 0.3.0.7 Category: Testing Synopsis: QuickCheck-2 support for the test-framework package. @@ -15,8 +14,9 @@ Build-Type: Simple Description: Allows @QuickCheck-2@ properties to be used with the . Tested-With: + GHC == 9.14.1 GHC == 9.12.2 - GHC == 9.10.2 + GHC == 9.10.3 GHC == 9.8.4 GHC == 9.6.7 GHC == 9.4.8