From 9159aac917d468337392ac5383ad3374d68391eb Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Tue, 15 Oct 2024 13:00:05 +0200 Subject: [PATCH 1/6] [#296] Support ghc-9.10.1 Problem: there is ghc-9.10 for a while, but we don't support it for several reasons. Solution: 1. Ignore foldl' import from Prelude in one module if GHC version is 9.10 or newer. This export was added to Prelude in base-4.20. 2. Add 9.10.1 to tested-with. 3. Update the CI config accordingly. 9.6 is still considered as the main version (as it's used in the latest LTS resolver), so we use it for 3 OS. --- .github/workflows/ci.yml | 5 +++++ src/Universum/Container/Class.hs | 3 +++ universum.cabal | 1 + 3 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95faccc..89dc184 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,8 +41,11 @@ jobs: - "9.4.5" - "9.6.3" - "9.8.1" + - "9.10.1" # Use only the "main" (usually latest) compiler version on non-Linux exclude: + - os: macOS-latest + ghc: 9.10.1 - os: macOS-latest ghc: 9.8.1 - os: macOS-latest @@ -53,6 +56,8 @@ jobs: ghc: 9.0.2 - os: macOS-latest ghc: 8.10.7 + - os: windows-latest + ghc: 9.10.1 - os: windows-latest ghc: 9.8.1 - os: windows-latest diff --git a/src/Universum/Container/Class.hs b/src/Universum/Container/Class.hs index 81b1246..ffea1f6 100644 --- a/src/Universum/Container/Class.hs +++ b/src/Universum/Container/Class.hs @@ -48,6 +48,9 @@ module Universum.Container.Class import Data.Coerce (Coercible, coerce) import Data.Kind (Type) import Prelude hiding (all, and, any, concatMap, elem, foldMap, foldl, foldr, mapM_, notElem, null, +#if __GLASGOW_HASKELL__ >= 910 + foldl', +#endif or, print, product, sequence_, sum) import Universum.Applicative (Alternative (..), Const, ZipList (..), pass) diff --git a/universum.cabal b/universum.cabal index 3eb6ffd..291b16e 100644 --- a/universum.cabal +++ b/universum.cabal @@ -19,6 +19,7 @@ tested-with: GHC == 8.10.7 , GHC == 9.4.5 , GHC == 9.6.3 , GHC == 9.8.1 + , GHC == 9.10.1 extra-doc-files: CHANGES.md , CONTRIBUTING.md , README.md From 0ad865830478ae65a54831e22cabba93c8ea6a67 Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Tue, 15 Oct 2024 13:11:32 +0200 Subject: [PATCH 2/6] [Chore] Delete a broken link http://www.stephendiehl.com/posts/protolude.html is no longer accessible. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e2c77b..e14bca1 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,7 @@ to replace default `Prelude` with an alternative. All we had to do is to impleme new basic set of defaults. There already were plenty of [preludes](https://guide.aelve.com/haskell/alternative-preludes-zr69k1hc), so we didn't plan to implement everything from scratch. After some long, hot discussions, our team decided to base our custom prelude on -[`protolude`](https://github.com/sdiehl/protolude). If you're not familiar with it, -you can read [a tutorial about `protolude`](http://www.stephendiehl.com/posts/protolude.html). +[`protolude`](https://github.com/protolude/protolude). The next section explains why we've made this choice and what we are willing to do. This tutorial doesn't cover the differences from `protolude`. Instead, it explains how Universum is different from regular `Prelude`. From 95e3842863cc7d852840f6590b4692e12f8c22c7 Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Tue, 15 Oct 2024 13:22:00 +0200 Subject: [PATCH 3/6] [Chore] Update Stack and Cabal versions on CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89dc184..bf97d09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - cabal: ["3.10"] + cabal: ["3.12"] # If you update this list of supported compiler versions, # make sure to update the `tested-with` section of `universum.cabal`. ghc: @@ -105,7 +105,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - stack: ["2.13.1"] + stack: ["3.1.1"] ghc: ["9.6.3"] steps: From ca1552645e8438c33f7f225cc015143616bbd14f Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Tue, 15 Oct 2024 13:29:42 +0200 Subject: [PATCH 4/6] [Chore] Temporarily make benchs not buildable Problem: CI refuses to build universum with GHC-9.10 because of `gauge`. It turned out to be a deprecated package. Solution: as temporary measure we disable building benchmarks completely. However, we should migrate to another library later. An issue is created for it. --- universum.cabal | 2 ++ 1 file changed, 2 insertions(+) diff --git a/universum.cabal b/universum.cabal index 291b16e..ea8f3cd 100644 --- a/universum.cabal +++ b/universum.cabal @@ -179,6 +179,8 @@ benchmark universum-benchmark ghc-options: -Wno-missing-safe-haskell-mode if impl(ghc >= 9.8.0) ghc-options: -Wno-x-partial + -- TODO (#298): migrate from gauge to something + buildable: False default-extensions: NoImplicitPrelude ScopedTypeVariables From 55885f7fb08fada1ea3ca6efad52265eac337be1 Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Tue, 15 Oct 2024 13:39:54 +0200 Subject: [PATCH 5/6] [Chore] Prepare the next release --- CHANGES.md | 6 ++++++ universum.cabal | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 73c0c8d..1cb9d78 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +1.8.2.2 +======= + +* [#297](https://github.com/serokell/universum/pull/297) + * Add support for GHC-9.10 without any user-visible changes. + 1.8.2.1 ======= diff --git a/universum.cabal b/universum.cabal index ea8f3cd..80447e9 100644 --- a/universum.cabal +++ b/universum.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: universum -version: 1.8.2.1 +version: 1.8.2.2 synopsis: Custom prelude used in Serokell description: See README.md file for more details. homepage: https://github.com/serokell/universum From aad5e5e39a91e282a348c37969de337c28adb64c Mon Sep 17 00:00:00 2001 From: Ivan Gromakovskii Date: Wed, 16 Oct 2024 18:54:27 +0200 Subject: [PATCH 6/6] Update resolver in stack.yaml and minor GHC versions on CI --- .github/workflows/ci.yml | 16 ++++++++-------- stack.yaml | 2 +- universum.cabal | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf97d09..c71cff5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,18 +38,18 @@ jobs: - "8.10.7" - "9.0.2" - "9.2.8" - - "9.4.5" - - "9.6.3" - - "9.8.1" + - "9.4.8" + - "9.6.6" + - "9.8.2" - "9.10.1" # Use only the "main" (usually latest) compiler version on non-Linux exclude: - os: macOS-latest ghc: 9.10.1 - os: macOS-latest - ghc: 9.8.1 + ghc: 9.8.2 - os: macOS-latest - ghc: 9.4.5 + ghc: 9.4.8 - os: macOS-latest ghc: 9.2.8 - os: macOS-latest @@ -59,9 +59,9 @@ jobs: - os: windows-latest ghc: 9.10.1 - os: windows-latest - ghc: 9.8.1 + ghc: 9.8.2 - os: windows-latest - ghc: 9.4.5 + ghc: 9.4.8 - os: windows-latest ghc: 9.2.8 - os: windows-latest @@ -106,7 +106,7 @@ jobs: strategy: matrix: stack: ["3.1.1"] - ghc: ["9.6.3"] + ghc: ["9.6.6"] steps: - uses: actions/checkout@v4 diff --git a/stack.yaml b/stack.yaml index 2d0dc93..f47039c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1 +1 @@ -resolver: lts-22.4 +resolver: lts-22.38 diff --git a/universum.cabal b/universum.cabal index 80447e9..54264e3 100644 --- a/universum.cabal +++ b/universum.cabal @@ -16,9 +16,9 @@ bug-reports: https://github.com/serokell/universum/issues tested-with: GHC == 8.10.7 , GHC == 9.0.2 , GHC == 9.2.8 - , GHC == 9.4.5 - , GHC == 9.6.3 - , GHC == 9.8.1 + , GHC == 9.4.8 + , GHC == 9.6.6 + , GHC == 9.8.2 , GHC == 9.10.1 extra-doc-files: CHANGES.md , CONTRIBUTING.md