Skip to content

Commit

Permalink
add buildable condition for crem-doctest in package.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosh committed Nov 28, 2024
1 parent db42d47 commit 87e6a79
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
17 changes: 9 additions & 8 deletions crem.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,11 @@ test-suite crem-doctests
LambdaCase
PackageImports
ghc-options: -Weverything -Wno-safe -Wno-unsafe -Wno-missing-safe-haskell-mode -Wno-implicit-prelude -Wno-missing-export-lists -Wno-missing-home-modules -Wno-missing-import-lists -Wno-all-missed-specialisations -Wno-prepositive-qualified-module -threaded -Wno-unused-packages
if !flag(test-doctest)
buildable: False
else
build-depends:
base >=4.15 && <4.19
, crem
, crem-examples
, doctest-parallel >=0.2.3 && <0.4
build-depends:
base >=4.15 && <4.19
, crem
, crem-examples
, doctest-parallel >=0.2.3 && <0.4
default-language: Haskell2010
if impl(ghc >= 9.2)
ghc-options: -Wno-missing-kind-signatures
Expand Down Expand Up @@ -408,6 +405,10 @@ test-suite crem-doctests
TypeSynonymInstances
if flag(errors)
ghc-options: -Werror
if flag(test-doctest)
buildable: True
else
buildable: False

test-suite crem-spec
type: exitcode-stdio-1.0
Expand Down
10 changes: 10 additions & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ flags:
default: False
manual: True

test-doctest:
description: run doctests
manual: True
default: True

when:
- condition: impl(ghc >= 9.2)
then:
Expand Down Expand Up @@ -167,6 +172,11 @@ tests:
- crem-examples
- doctest-parallel >= 0.2.3 && < 0.4
when:
- condition: flag(test-doctest)
then:
buildable: True
else:
buildable: False
- condition: false
other-modules: Paths_crem

Expand Down

0 comments on commit 87e6a79

Please sign in to comment.