Skip to content

Commit 45df065

Browse files
authored
Merge pull request #75 from input-output-hk/erikd/ghc-9.10
Make it build with ghc-9.10
2 parents 793b56d + 3feaca1 commit 45df065

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
lines changed

.github/workflows/haskell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
ghc: ["8.10.7", "9.2.8", "9.4.8", "9.6.4", "9.8.2"]
25+
ghc: ["8.10.7", "9.2.8", "9.4.8", "9.6.4", "9.8.2", "9.10.1"]
2626
cabal: ["3.10.3.0"]
2727
os: [ubuntu-latest, windows-latest, macOS-13]
2828

fs-api/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* Add a clarification in the documentation of `FsPath` that the user is
3333
responsible for picking sensible directory/file names.
3434
* Bump upper version bounds for `io-classes` to `1.6`
35+
* Make it build with `ghc-9.10`.
3536

3637
## 0.2.0.1 -- 2023-10-30
3738

fs-api/fs-api.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extra-doc-files:
1717
CHANGELOG.md
1818
README.md
1919

20-
tested-with: GHC ==8.10 || ==9.2 || ==9.4 || ==9.6 || ==9.8
20+
tested-with: GHC ==8.10 || ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10
2121

2222
source-repository head
2323
type: git
@@ -39,13 +39,13 @@ library
3939

4040
default-language: Haskell2010
4141
build-depends:
42-
, base >=4.14 && <4.20
42+
, base >=4.14 && <4.21
4343
, bytestring >=0.10 && <0.13
44-
, containers >=0.5 && <0.7
44+
, containers >=0.5 && <0.8
4545
, deepseq
4646
, digest
4747
, directory >=1.3 && <1.4
48-
, filepath >=1.4 && <1.5
48+
, filepath >=1.4 && <1.6
4949
, io-classes >=0.3 && <1.6
5050
, primitive ^>=0.9
5151
, safe-wild-cards ^>=1.0

fs-sim/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* The `Show Errors` instance was not printing every stream.
3434
* The shrinker for `Errors` was not shrinking every stream.
3535
* Adapt to moving of `Util` modules in `fs-api`.
36+
* Make it build with `ghc-9.10`.
3637

3738
## 0.2.1.1 -- 2023-10-30
3839

fs-sim/fs-sim.cabal

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extra-doc-files:
1717
CHANGELOG.md
1818
README.md
1919

20-
tested-with: GHC ==8.10 || ==9.2 || ==9.4 || ==9.6 || ==9.8
20+
tested-with: GHC ==8.10 || ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10
2121

2222
source-repository head
2323
type: git
@@ -36,10 +36,10 @@ library
3636
other-modules: System.FS.Sim.Prim
3737
default-language: Haskell2010
3838
build-depends:
39-
, base >=4.14 && <4.20
39+
, base >=4.14 && <4.21
4040
, base16-bytestring
4141
, bytestring >=0.10 && <0.13
42-
, containers >=0.5 && <0.7
42+
, containers >=0.5 && <0.8
4343
, fs-api ^>=0.2
4444
, io-classes >=0.3 && <1.6
4545
, mtl
@@ -86,7 +86,7 @@ test-suite fs-sim-test
8686
, pretty-show
8787
, primitive
8888
, QuickCheck
89-
, quickcheck-state-machine >=0.7.2 && <0.8
89+
, quickcheck-state-machine >=0.10
9090
, random
9191
, safe-wild-cards
9292
, strict-stm
@@ -95,7 +95,6 @@ test-suite fs-sim-test
9595
, tasty-quickcheck
9696
, temporary
9797
, text
98-
, tree-diff
9998

10099
ghc-options:
101100
-Wall -Wcompat -Wincomplete-uni-patterns

fs-sim/test/Test/System/FS/StateMachine.hs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ module Test.System.FS.StateMachine (
5757
, tests
5858
) where
5959

60+
#if __GLASGOW_HASKELL__<910
61+
import Data.Foldable (foldl')
62+
#endif
63+
6064
import qualified Control.Exception as E
6165
import Control.Monad
6266
import Control.Monad.Primitive
@@ -69,7 +73,6 @@ import Data.ByteString (ByteString)
6973
import qualified Data.ByteString as BS
7074
import Data.Functor.Classes
7175
import Data.Int (Int64)
72-
import Data.List (foldl')
7376
import qualified Data.List as L
7477
import Data.Map.Strict (Map)
7578
import qualified Data.Map.Strict as Map
@@ -79,14 +82,14 @@ import Data.Proxy
7982
import Data.Set (Set)
8083
import qualified Data.Set as Set
8184
import qualified Data.Text as Text
82-
import Data.TreeDiff (ToExpr (..), defaultExprViaShow)
8385
import Data.Word (Word64)
8486
import qualified Generics.SOP as SOP
8587
import GHC.Generics
8688
import GHC.Stack hiding (prettyCallStack)
8789
import System.IO.Temp (withSystemTempDirectory)
8890
import System.Posix.Types (ByteCount)
8991
import System.Random (getStdRandom, randomR)
92+
import Test.StateMachine.TreeDiff
9093
import Text.Read (readMaybe)
9194
import Text.Show.Pretty (ppShow)
9295

@@ -842,7 +845,7 @@ mock model cmd = At <$> bitraverse (const QSM.genSym) (const QSM.genSym) resp
842845

843846
precondition :: Model Symbolic -> Cmd :@ Symbolic -> QSM.Logic
844847
precondition m@Model{..} (At cmd) =
845-
QSM.forall (handles cmd) (`QSM.member` RE.keys knownHandles)
848+
QSM.forAll (handles cmd) (`QSM.member` RE.keys knownHandles)
846849
QSM.:&& QSM.Boolean (Mock.numOpenHandles mockFS < maxNumOpenHandles)
847850
QSM.:&& QSM.Not (knownLimitation m (At cmd))
848851
where
@@ -1626,7 +1629,7 @@ runCmds cmds = QC.monadicIO $ do
16261629
hfs = ioHasFS mount
16271630
sm' = sm hfs
16281631

1629-
(hist, model, res) <- QSM.runCommands' (pure sm') cmds
1632+
(hist, model, res) <- QSM.runCommands' sm' cmds
16301633

16311634
-- Close all open handles
16321635
forM_ (RE.keys (knownHandles model)) $ hClose hfs . QSM.concrete

fs-sim/test/Test/Util/RefEnv.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{-# LANGUAGE DeriveAnyClass #-}
22
{-# LANGUAGE DeriveGeneric #-}
3+
{-# LANGUAGE FlexibleContexts #-}
34
{-# LANGUAGE PolyKinds #-}
45
{-# LANGUAGE ScopedTypeVariables #-}
6+
{-# LANGUAGE StandaloneDeriving #-}
57
{-# LANGUAGE TupleSections #-}
68

79
-- | Environments of QSM references.
@@ -28,10 +30,10 @@ import qualified Prelude
2830
import Data.Bifunctor
2931
import Data.Functor.Classes
3032
import Data.List (intercalate)
31-
import Data.TreeDiff (ToExpr)
3233
import GHC.Generics (Generic)
3334
import GHC.Stack
3435
import Test.StateMachine (Reference)
36+
import Test.StateMachine.TreeDiff
3537
import qualified Test.StateMachine.Types.Rank2 as Rank2
3638

3739
data RefEnv k a r = RefEnv { toList :: [(Reference k r, a)] }

0 commit comments

Comments
 (0)