diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 46a29e7..0ad8776 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -47,9 +47,9 @@ jobs: compilerVersion: 9.12.4 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index be4a29a..a987a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.0.6 + +- Use automatic flags for compatibility conditionals + # 1.0.5 - Support GHC-8.6.5..GHC-9.10.1 diff --git a/binary-orphans.cabal b/binary-orphans.cabal index 3ca56f9..c1b6d54 100644 --- a/binary-orphans.cabal +++ b/binary-orphans.cabal @@ -1,6 +1,6 @@ cabal-version: 1.12 name: binary-orphans -version: 1.0.5.1 +version: 1.0.6 synopsis: Compatibility package for binary; provides instances category: Data, Binary, Parsing, Compatibility description: @@ -23,7 +23,7 @@ tested-with: || ==9.4.8 || ==9.6.6 || ==9.8.4 - || ==9.10.2 + || ==9.10.3 || ==9.12.4 || ==9.14.1 @@ -33,6 +33,16 @@ source-repository head type: git location: https://github.com/phadej/binary-orphans.git +flag base-ge-4-16 + description: @base >=4.16@ (GHC-9.2) + default: True + manual: False + +flag base-ge-4-17 + description: @base >=4.17@ (GHC-9.4) + default: True + manual: False + library default-language: Haskell2010 hs-source-dirs: src @@ -43,12 +53,24 @@ library base >=4.12.0.0 && <4.23 , binary >=0.8.6.0 && <0.8.10 - if !impl(ghc >=9.2) + if !flag(base-ge-4-16) build-depends: OneTuple >=0.4.2 && <0.5 - if impl(ghc >=8.0 && <9.4) + if !flag(base-ge-4-17) build-depends: data-array-byte >=0.1.0.1 && <0.2 + if flag(base-ge-4-16) + build-depends: base >=4.16 + + else + build-depends: base <4.16 + + if flag(base-ge-4-17) + build-depends: base >=4.17 + + else + build-depends: base <4.17 + test-suite binary-orphans-test default-language: Haskell2010 type: exitcode-stdio-1.0 @@ -64,5 +86,5 @@ test-suite binary-orphans-test , tasty >=0.10.1.2 && <1.6 , tasty-quickcheck >=0.8.3.2 && <0.12 - if impl(ghc >=8.0 && <9.4) + if !flag(base-ge-4-17) build-depends: data-array-byte