Skip to content

Commit 8ec0546

Browse files
committed
Build with ghc-9.10
1 parent 01cfcae commit 8ec0546

File tree

12 files changed

+36
-20
lines changed

12 files changed

+36
-20
lines changed

.github/workflows/haskell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
ghc: ["8.10", "9.2", "9.4", "9.6", "9.8"]
14+
ghc: ["8.10", "9.2", "9.4", "9.6", "9.8", "9.10"]
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616

1717
defaults:
@@ -27,7 +27,7 @@ jobs:
2727
id: setup-haskell
2828
with:
2929
ghc-version: ${{ matrix.ghc }}
30-
cabal-version: "3.10.1.0"
30+
cabal-version: "3.10.3.0"
3131

3232
- name: Install LLVM (macOS)
3333
if: runner.os == 'macOS'

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
index-state: hackage.haskell.org 2023-11-06T00:00:00Z
1+
index-state: hackage.haskell.org 2024-05-17T03:42:00Z
22

33
packages: ./io-sim
44
./io-classes

io-classes-mtl/io-classes-mtl.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ category: Control
1515
build-type: Simple
1616
extra-doc-files: README.md CHANGELOG.md
1717
bug-reports: https://github.com/input-output-hk/io-sim/issues
18-
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8 }
18+
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8, 9.10 }
1919

2020
common warnings
2121
ghc-options: -Wall
@@ -40,7 +40,7 @@ library
4040
, Control.Monad.Class.MonadTime.SI.Trans
4141
, Control.Monad.Class.MonadTimer.Trans
4242
, Control.Monad.Class.MonadTimer.SI.Trans
43-
build-depends: base >=4.9 && <4.20,
43+
build-depends: base >=4.9 && <4.21,
4444
array,
4545
mtl,
4646

io-classes-mtl/src/Control/Monad/Class/MonadSTM/Trans.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveFunctor #-}
23
{-# LANGUAGE FlexibleContexts #-}
34
{-# LANGUAGE FlexibleInstances #-}
@@ -51,6 +52,9 @@ instance ( MonadSTM m, MArray e a (STM m) ) => MArray e a (ContTSTM r m) where
5152
getNumElements = ContTSTM . getNumElements
5253
unsafeRead arr = ContTSTM . unsafeRead arr
5354
unsafeWrite arr i = ContTSTM . unsafeWrite arr i
55+
#if __GLASGOW_HASKELL__ >= 910
56+
newArray idxs = ContTSTM . newArray idxs
57+
#endif
5458

5559

5660
-- note: this (and the following) instance requires 'UndecidableInstances'

io-classes/io-classes.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ category: Control
1919
build-type: Simple
2020
extra-doc-files: CHANGELOG.md README.md
2121
bug-reports: https://github.com/input-output-hk/io-sim/issues
22-
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8 }
22+
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8, 9.10 }
2323

2424
source-repository head
2525
type: git
@@ -93,12 +93,12 @@ library
9393
TypeFamilyDependencies
9494
TypeOperators
9595
UndecidableInstances
96-
build-depends: base >=4.9 && <4.20,
96+
build-depends: base >=4.9 && <4.21,
9797
array,
9898
async >=2.1,
9999
bytestring,
100100
mtl >=2.2 && <2.4,
101-
primitive >= 0.7 && <0.10,
101+
primitive >= 0.7 && <0.11,
102102
stm >=2.5 && <2.6,
103103
time >=1.9.1 && <1.13
104104

io-sim/io-sim.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ category: Testing
1515
build-type: Simple
1616
extra-doc-files: CHANGELOG.md README.md
1717
bug-reports: https://github.com/input-output-hk/io-sim/issues
18-
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8 }
18+
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8, 9.10 }
1919

2020
flag asserts
2121
description: Enable assertions
@@ -75,13 +75,13 @@ library
7575
RankNTypes,
7676
ScopedTypeVariables,
7777
TypeFamilies
78-
build-depends: base >=4.9 && <4.20,
79-
io-classes ^>=1.4.1,
78+
build-depends: base >=4.9 && <4.21,
79+
io-classes ^>=1.4,
8080
exceptions >=0.10,
8181
containers,
8282
deepseq,
8383
nothunks,
84-
primitive >=0.7 && <0.10,
84+
primitive >=0.7 && <0.11,
8585
psqueues >=0.2 && <0.3,
8686
strict-stm ^>=1.4,
8787
si-timers ^>=1.4,
@@ -131,7 +131,7 @@ benchmark bench
131131
default-language: Haskell2010
132132
default-extensions: ImportQualifiedPost
133133
build-depends: base,
134-
criterion,
134+
criterion ^>= 1.6,
135135

136136
io-classes,
137137
io-sim,

io-sim/src/Data/Deque/Strict.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE LambdaCase #-}
23

34
-- | A minimal implementation of a strict deque.
45
--
56
module Data.Deque.Strict where
67

8+
#if __GLASGOW_HASKELL__ >= 910
9+
import Data.Foldable (foldr')
10+
#else
711
import Data.Foldable (foldl', foldr')
12+
#endif
813
import Data.List qualified as List
914
import Prelude hiding (head, init, tail)
1015

io-sim/test/Test/Control/Monad/IOSim.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ module Test.Control.Monad.IOSim
2424

2525
import Data.Either (isLeft)
2626
import Data.Fixed (Micro)
27+
#if __GLASGOW_HASKELL__ < 910
2728
import Data.Foldable (foldl')
29+
#endif
2830
import Data.Functor (($>))
2931
import Data.Time.Clock (picosecondsToDiffTime)
3032

io-sim/test/Test/Control/Monad/IOSimPOR.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveGeneric #-}
23
{-# LANGUAGE FlexibleContexts #-}
34
{-# LANGUAGE LambdaCase #-}
@@ -11,7 +12,11 @@
1112
module Test.Control.Monad.IOSimPOR (tests) where
1213

1314
import Data.Fixed (Micro)
15+
#if __GLASGOW_HASKELL__ >= 910
16+
import Data.Foldable (traverse_)
17+
#else
1418
import Data.Foldable (foldl', traverse_)
19+
#endif
1520
import Data.Functor (($>))
1621
import Data.List qualified as List
1722
import Data.Map (Map)

si-timers/si-timers.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ category: Time
1414
build-type: Simple
1515
extra-doc-files: CHANGELOG.md README.md
1616
bug-reports: https://github.com/input-output-hk/io-sim/issues
17-
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8 }
17+
tested-with: GHC == { 8.10, 9.2, 9.4, 9.6, 9.8, 9.10 }
1818

1919
flag asserts
2020
description: Enable assertions
@@ -53,7 +53,7 @@ library
5353
NumericUnderscores,
5454
ScopedTypeVariables,
5555
TypeFamilies
56-
build-depends: base >=4.9 && <4.20,
56+
build-depends: base >=4.9 && <4.21,
5757
deepseq,
5858
mtl,
5959
nothunks,

0 commit comments

Comments
 (0)