From a61421c1013a5eb5727c7768856e5a453fa2cb0e Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 23 Aug 2026 17:23:25 +0200 Subject: [PATCH] Run doctest with GHC >= 9.14 --- .github/workflows/haskell-ci.yml | 20 +++++++++---------- cabal.haskell-ci | 2 +- .../src/Effectful/Dispatch/Dynamic.hs | 1 + 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index f5d44e66..4e9df07f 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -148,7 +148,7 @@ jobs: - name: cache (tools) uses: actions/cache/restore@v5 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a943d659 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-98456d37 path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -161,13 +161,13 @@ jobs: cabal-plan --version - name: install doctest run: | - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project doctest --constraint='doctest ^>=0.25.0' ; fi - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then doctest --version ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project doctest --constraint='doctest ^>=0.25.0' ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then doctest --version ; fi - name: save cache (tools) if: always() uses: actions/cache/save@v5 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-a943d659 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-98456d37 path: ~/.haskell-ci-tools - name: checkout uses: actions/checkout@v7 @@ -284,12 +284,12 @@ jobs: $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct - name: doctest run: | - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then cd ${PKGDIR_effectful_core} || false ; fi - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then doctest -XGHC2021 -XDataKinds -XDeepSubsumption -XDerivingStrategies -XDuplicateRecordFields -XLambdaCase -XNoFieldSelectors -XNoStarIsType -XOverloadedRecordDot -XRoleAnnotations -XTypeFamilies -XUndecidableInstances src ; fi - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then cd ${PKGDIR_effectful_th} || false ; fi - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then doctest -XGHC2021 -XDataKinds -XDeepSubsumption -XDerivingStrategies -XDuplicateRecordFields -XLambdaCase -XNoFieldSelectors -XNoStarIsType -XOverloadedRecordDot -XRoleAnnotations -XTypeFamilies -XUndecidableInstances src ; fi - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then cd ${PKGDIR_effectful} || false ; fi - if [ $((HCNUMVER < 91200)) -ne 0 ] ; then doctest -XGHC2021 -XDataKinds -XDeepSubsumption -XDerivingStrategies -XDuplicateRecordFields -XLambdaCase -XNoFieldSelectors -XNoStarIsType -XOverloadedRecordDot -XRoleAnnotations -XTypeFamilies -XUndecidableInstances src ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_effectful_core} || false ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then doctest -XGHC2021 -XDataKinds -XDeepSubsumption -XDerivingStrategies -XDuplicateRecordFields -XLambdaCase -XNoFieldSelectors -XNoStarIsType -XOverloadedRecordDot -XRoleAnnotations -XTypeFamilies -XUndecidableInstances src ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_effectful_th} || false ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then doctest -XGHC2021 -XDataKinds -XDeepSubsumption -XDerivingStrategies -XDuplicateRecordFields -XLambdaCase -XNoFieldSelectors -XNoStarIsType -XOverloadedRecordDot -XRoleAnnotations -XTypeFamilies -XUndecidableInstances src ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_effectful} || false ; fi + if [ $((HCNUMVER < 91200 || HCNUMVER >= 91400)) -ne 0 ] ; then doctest -XGHC2021 -XDataKinds -XDeepSubsumption -XDerivingStrategies -XDuplicateRecordFields -XLambdaCase -XNoFieldSelectors -XNoStarIsType -XOverloadedRecordDot -XRoleAnnotations -XTypeFamilies -XUndecidableInstances src ; fi - name: cabal check run: | cd ${PKGDIR_effectful_core} || false diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 63db2141..3df2db1d 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,6 +1,6 @@ branches: master -doctest: <9.11 +doctest: <9.12 || >=9.14 doctest-skip: effectful-plugin tests: True diff --git a/effectful-core/src/Effectful/Dispatch/Dynamic.hs b/effectful-core/src/Effectful/Dispatch/Dynamic.hs index b87f7b00..06020efb 100644 --- a/effectful-core/src/Effectful/Dispatch/Dynamic.hs +++ b/effectful-core/src/Effectful/Dispatch/Dynamic.hs @@ -579,6 +579,7 @@ reinterpretWith runSetup action handler = reinterpretImpl runSetup action $ -- passthrough, called at :... -- handler, called at src/Effectful/Dispatch/Dynamic.hs:... -- send, called at :... +-- ... interpose :: (HasCallStack, DispatchOf e ~ Dynamic, e :> es) => EffectHandler e es