From 9636efc353eec93cdcce53d887522f4549a51e0f Mon Sep 17 00:00:00 2001 From: Veronika Romashkina Date: Wed, 1 Mar 2023 16:43:34 +0000 Subject: [PATCH] [#70] Support GHC-9.4 (#71) * [#70] Support GHC-9.4 Resolves #70 * [#70] Update CI Resolves #70 * Update to GHC-9.4.4 * Drop support of GHC-8.4 * Update version number --- .github/CODEOWNERS | 2 +- .github/workflows/ci.yml | 22 ++++++++++++---------- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- src/Validation.hs | 6 +++--- src/Validation.o-boot | 0 src/Validation/Combinators.hs | 2 +- validation-selective.cabal | 24 +++++++++++------------- 8 files changed, 39 insertions(+), 29 deletions(-) create mode 100644 src/Validation.o-boot diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e6a2f51..47e8c0d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @chshersh @vrom911 +* @vrom911 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b08cf52..771ac21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,39 +16,41 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.6.2.0"] + cabal: ["3.8"] ghc: - - "8.4.4" - "8.6.5" - "8.8.4" - "8.10.7" - "9.0.2" - - "9.2.2" + - "9.2.7" + - "9.4.4" exclude: + - os: macOS-latest + ghc: 9.2.7 - os: macOS-latest ghc: 9.0.2 + - os: macOS-latest + ghc: 8.10.7 - os: macOS-latest ghc: 8.8.4 - os: macOS-latest ghc: 8.6.5 - - os: macOS-latest - ghc: 8.4.4 - - os: macOS-latest - ghc: 8.2.2 + - os: windows-latest + ghc: 9.2.7 - os: windows-latest ghc: 9.0.2 + - os: windows-latest + ghc: 8.10.7 - os: windows-latest ghc: 8.8.4 - os: windows-latest ghc: 8.6.5 - - os: windows-latest - ghc: 8.4.4 steps: - uses: actions/checkout@v3 - - uses: haskell/actions/setup@v2.3 + - uses: haskell/actions/setup@v2 id: setup-haskell-cabal name: Setup Haskell with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4278858..148b944 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ `validation-selective` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +## 0.2.0.0 — Mar 1, 2023 + +* [#62](https://github.com/kowainik/validation-selective/issues/62): + Support GHC-9.4. +* Allow `hedgehog-1.2`. +* Allow `selective-0.6`. +* Allow `doctest-0.21`. +* Remove support for GHC-8.4 (due to `selective-0.6`, which dropped support for + the earlier GHCs). + ## 0.1.0.2 — Jun 11, 2021 * [#62](https://github.com/kowainik/validation-selective/issues/62): diff --git a/README.md b/README.md index 78fa363..f0edfd6 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ popular validation packages in the Haskell ecosystem: ## How to use `validation-selective` is compatible with the latest GHC compiler -versions starting from `8.4.4`. +versions starting from `8.6`. In order to start using `validation-selective` in your project, you will need to set it up with the three easy steps: diff --git a/src/Validation.hs b/src/Validation.hs index 87a671a..3464dfa 100644 --- a/src/Validation.hs +++ b/src/Validation.hs @@ -7,7 +7,7 @@ {- | Copyright: (c) 2014 Chris Allen, Edward Kmett - (c) 2018-2022 Kowainik + (c) 2018-2023 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik Stability: Stable @@ -408,7 +408,7 @@ __Examples__ >>> mempty :: Validation String [Bool] Success [] -} -instance (Semigroup e, Semigroup a, Monoid a) => Monoid (Validation e a) where +instance (Semigroup e, Monoid a) => Monoid (Validation e a) where mempty :: Validation e a mempty = Success mempty {-# INLINE mempty #-} @@ -639,7 +639,7 @@ Failure ["WRONG","FAIL"] >>> failure2 <|> success2 Success [15] -} -instance (Semigroup e, Monoid e) => Alternative (Validation e) where +instance (Monoid e) => Alternative (Validation e) where empty :: Validation e a empty = Failure mempty {-# INLINE empty #-} diff --git a/src/Validation.o-boot b/src/Validation.o-boot new file mode 100644 index 0000000..e69de29 diff --git a/src/Validation/Combinators.hs b/src/Validation/Combinators.hs index 6f34003..d28cb2d 100644 --- a/src/Validation/Combinators.hs +++ b/src/Validation/Combinators.hs @@ -1,5 +1,5 @@ {- | -Copyright: (c) 2020-2022 Kowainik +Copyright: (c) 2020-2023 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik Stability: Stable diff --git a/validation-selective.cabal b/validation-selective.cabal index 62c3ac8..3d75fad 100644 --- a/validation-selective.cabal +++ b/validation-selective.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: validation-selective -version: 0.1.0.2 +version: 0.2.0.0 synopsis: Lighweight pure data validation based on Applicative and Selective functors description: Lighweight pure data validation based on Applicative and Selective @@ -20,24 +20,24 @@ license: MPL-2.0 license-file: LICENSE author: Dmitrii Kovanikov, Veronika Romashkina maintainer: Kowainik -copyright: 2020-2022 Kowainik +copyright: 2020-2023 Kowainik category: Validation, Selective, Data build-type: Simple extra-doc-files: README.md CHANGELOG.md -tested-with: GHC == 8.4.4 - GHC == 8.6.5 +tested-with: GHC == 8.6.5 GHC == 8.8.4 GHC == 8.10.7 GHC == 9.0.2 - GHC == 9.2.2 + GHC == 9.2.7 + GHC == 9.4.4 source-repository head type: git location: https://github.com/kowainik/validation-selective.git common common-options - build-depends: base >= 4.11 && < 4.17 + build-depends: base >= 4.12 && < 4.18 ghc-options: -Wall -Wcompat @@ -45,10 +45,8 @@ common common-options -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints - if impl(ghc >= 8.2) - ghc-options: -fhide-source-paths - if impl(ghc >= 8.4) - ghc-options: -Wmissing-export-lists + -fhide-source-paths + -Wmissing-export-lists -Wpartial-fields if impl(ghc >= 8.8) ghc-options: -Wmissing-deriving-strategies @@ -82,7 +80,7 @@ library exposed-modules: Validation Validation.Combinators build-depends: deepseq ^>= 1.4.3.0 - , selective >= 0.3 && < 0.6 + , selective >= 0.3 && < 0.7 test-suite validation-selective-test import: common-options @@ -93,7 +91,7 @@ test-suite validation-selective-test Test.Laws Test.Properties build-depends: validation-selective - , hedgehog >= 1.0 && < 1.2 + , hedgehog >= 1.0 && < 1.3 , hspec >= 2.7.1 && < 2.11 , hspec-hedgehog ^>= 0.0.1.1 , selective @@ -107,5 +105,5 @@ test-suite validation-selective-doctest type: exitcode-stdio-1.0 hs-source-dirs: test main-is: Doctest.hs - build-depends: doctest >= 0.16 && < 0.21 + build-depends: doctest >= 0.16 && < 0.22 ghc-options: -threaded