Skip to content

Commit

Permalink
Support for building with Ghc 9.10 (with CI) (#19)
Browse files Browse the repository at this point in the history
* stop using old hedgehog; current version on hackage already supports 2.18

* build with ghc 9.4

* build with ghc 9.10

* use foldable1-classes-compat

* remove dependency on semigroupsoids, since that is provided by foldable1-classes-compat

* Update ci.yml for newer actions, GHCs

* Exclude MacOS with non-native backend (e.g. LLVM)

---------

Co-authored-by: Frank Staals <[email protected]>
Co-authored-by: Frank Staals <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent 1d4256d commit 1e946cd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.6"]
cabal: ["3.12"]
ghc:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"
- "9.2.1"
- "9.2.8"
- "9.4.8"
- "9.6.6"
- "9.8.2"
- "9.10.1"
exclude:
# Make sure we only use GHCs with the native backend
# announced in haskell.org/ghc/blog/20211029-ghc-9.2.1-released.html
- os: macos-latest
ghc: "8.10.7"
- os: macos-latest
ghc: "9.0.2"

steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v4
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'

- uses: haskell/actions/setup@v1
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
Expand All @@ -35,7 +44,7 @@ jobs:
run: |
cabal freeze
- uses: actions/cache@v1
- uses: actions/cache@v4
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
Expand Down
6 changes: 3 additions & 3 deletions src/Data/Vector/Circular.hs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ import Control.DeepSeq
#endif /* MIN_VERSION_base(4,13,0) */
import Data.List.NonEmpty (NonEmpty((:|)))
import Data.Primitive.MutVar ( newMutVar, readMutVar, writeMutVar )
import Data.Semigroup.Foldable.Class (Foldable1)
import Data.Foldable1 (Foldable1)
import Data.Monoid (All(..))
import Data.Vector (Vector)
import Data.Vector.NonEmpty (NonEmptyVector)
Expand All @@ -206,10 +206,10 @@ import Prelude hiding (head, length, last, map, concat, takeWhile
,foldl, foldr1, foldl1, all, any, and, or, sum
,product, maximum, minimum, concatMap
,zipWith, zipWith3, zip, zip3, replicate, enumFromTo
,enumFromThenTo, (++), filter)
,enumFromThenTo, (++), filter, foldl')

Check warning on line 209 in src/Data/Vector/Circular.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.8.2

Module ‘Prelude’ does not export ‘foldl'’.
import Language.Haskell.TH.Syntax
import qualified Data.Foldable as Foldable
import qualified Data.Semigroup.Foldable.Class as Foldable1
import qualified Data.Foldable1 as Foldable1
import qualified Data.Vector as Vector
import qualified Data.Vector.Mutable as MVector
import qualified Data.Vector.NonEmpty as NonEmpty
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Vector/Circular/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ import Prelude hiding (head, length, last, map, concat, takeWhile
,foldl, foldr1, foldl1, all, any, and, or, sum
,product, maximum, minimum, concatMap
,zipWith, zipWith3, zip, zip3, replicate, enumFromTo
,enumFromThenTo, (++), filter)
,enumFromThenTo, (++), filter, foldl')

Check warning on line 205 in src/Data/Vector/Circular/Generic.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.8.2

Module ‘Prelude’ does not export ‘foldl'’.
import Language.Haskell.TH.Syntax
import qualified Data.Vector.Mutable as MVector
import qualified Data.Vector.NonEmpty as NonEmpty
Expand Down
12 changes: 6 additions & 6 deletions vector-circular.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ library
Data.Vector.Circular
Data.Vector.Circular.Generic
build-depends:
, base >= 4.11 && < 4.18
, base >= 4.11 && < 4.21
, nonempty-vector >= 0.2 && < 0.3
, primitive >= 0.6.4 && < 0.8
, semigroupoids >= 5.3 && < 5.4
, template-haskell >= 2.12 && < 2.20
, vector >= 0.12 && < 0.13
, deepseq >= 1.4 && < 1.5
, primitive >= 0.6.4 && < 0.10
, template-haskell >= 2.12 && < 2.23
, vector >= 0.12 && < 0.14
, deepseq >= 1.4 && < 1.6
, foldable1-classes-compat >= 0.1 && < 0.2
ghc-options:
-Wall
-O2
Expand Down

0 comments on commit 1e946cd

Please sign in to comment.