Skip to content

Commit

Permalink
Make it build with ghc-9.10
Browse files Browse the repository at this point in the history
Co-authored-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Co-authored-by: Joris Dral <joris@well-typed.com>
  • Loading branch information
erikd and jorisdral committed Jul 15, 2024
1 parent 793b56d commit f9c0d6a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions fs-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* Add a clarification in the documentation of `FsPath` that the user is
responsible for picking sensible directory/file names.
* Bump upper version bounds for `io-classes` to `1.6`
* Make it build with `ghc-9.10`.

## 0.2.0.1 -- 2023-10-30

Expand Down
8 changes: 4 additions & 4 deletions fs-api/fs-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extra-doc-files:
CHANGELOG.md
README.md

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

source-repository head
type: git
Expand All @@ -39,13 +39,13 @@ library

default-language: Haskell2010
build-depends:
, base >=4.14 && <4.20
, base >=4.14 && <4.21
, bytestring >=0.10 && <0.13
, containers >=0.5 && <0.7
, containers >=0.5 && <0.8
, deepseq
, digest
, directory >=1.3 && <1.4
, filepath >=1.4 && <1.5
, filepath >=1.4 && <1.6
, io-classes >=0.3 && <1.6
, primitive ^>=0.9
, safe-wild-cards ^>=1.0
Expand Down
1 change: 1 addition & 0 deletions fs-sim/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* The `Show Errors` instance was not printing every stream.
* The shrinker for `Errors` was not shrinking every stream.
* Adapt to moving of `Util` modules in `fs-api`.
* Make it build with `ghc-9.10`.

## 0.2.1.1 -- 2023-10-30

Expand Down
9 changes: 4 additions & 5 deletions fs-sim/fs-sim.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extra-doc-files:
CHANGELOG.md
README.md

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

source-repository head
type: git
Expand All @@ -36,10 +36,10 @@ library
other-modules: System.FS.Sim.Prim
default-language: Haskell2010
build-depends:
, base >=4.14 && <4.20
, base >=4.14 && <4.21
, base16-bytestring
, bytestring >=0.10 && <0.13
, containers >=0.5 && <0.7
, containers >=0.5 && <0.8
, fs-api ^>=0.2
, io-classes >=0.3 && <1.6
, mtl
Expand Down Expand Up @@ -86,7 +86,7 @@ test-suite fs-sim-test
, pretty-show
, primitive
, QuickCheck
, quickcheck-state-machine >=0.7.2 && <0.8
, quickcheck-state-machine >=0.10
, random
, safe-wild-cards
, strict-stm
Expand All @@ -95,7 +95,6 @@ test-suite fs-sim-test
, tasty-quickcheck
, temporary
, text
, tree-diff

ghc-options:
-Wall -Wcompat -Wincomplete-uni-patterns
Expand Down
11 changes: 7 additions & 4 deletions fs-sim/test/Test/System/FS/StateMachine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ module Test.System.FS.StateMachine (
, tests
) where

#if __GLASGOW_HASKELL__<910
import Data.Foldable (foldl')
#endif

import qualified Control.Exception as E
import Control.Monad
import Control.Monad.Primitive
Expand All @@ -69,7 +73,6 @@ import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Data.Functor.Classes
import Data.Int (Int64)
import Data.List (foldl')
import qualified Data.List as L
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
Expand All @@ -79,14 +82,14 @@ import Data.Proxy
import Data.Set (Set)
import qualified Data.Set as Set
import qualified Data.Text as Text
import Data.TreeDiff (ToExpr (..), defaultExprViaShow)
import Data.Word (Word64)
import qualified Generics.SOP as SOP
import GHC.Generics
import GHC.Stack hiding (prettyCallStack)
import System.IO.Temp (withSystemTempDirectory)
import System.Posix.Types (ByteCount)
import System.Random (getStdRandom, randomR)
import Test.StateMachine.TreeDiff
import Text.Read (readMaybe)
import Text.Show.Pretty (ppShow)

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

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

(hist, model, res) <- QSM.runCommands' (pure sm') cmds
(hist, model, res) <- QSM.runCommands' sm' cmds

-- Close all open handles
forM_ (RE.keys (knownHandles model)) $ hClose hfs . QSM.concrete
Expand Down
4 changes: 3 additions & 1 deletion fs-sim/test/Test/Util/RefEnv.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TupleSections #-}

-- | Environments of QSM references.
Expand All @@ -28,10 +30,10 @@ import qualified Prelude
import Data.Bifunctor
import Data.Functor.Classes
import Data.List (intercalate)
import Data.TreeDiff (ToExpr)
import GHC.Generics (Generic)
import GHC.Stack
import Test.StateMachine (Reference)
import Test.StateMachine.TreeDiff
import qualified Test.StateMachine.Types.Rank2 as Rank2

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

0 comments on commit f9c0d6a

Please sign in to comment.