Compare commits

...

8 Commits

Author SHA1 Message Date
Michael Walker
ee73a6ac27
Merge pull request #360 from barrucadu/dejafu-2.4.0.4
Release dejafu-2.4.0.4
2022-08-22 16:17:43 +01:00
Michael Walker
e7c466ed5c Release dejafu-2.4.0.4 2022-08-22 15:44:13 +01:00
Michael Walker
38aa7dc407
Merge pull request #359 from barrucadu/ghc-9.2
Add GHC 9.2 to supported versions list
2022-08-22 15:42:31 +01:00
Michael Walker
469f52036c
Merge pull request #358 from barrucadu/leancheck-2
Bump upper bound on leancheck to <2
2022-08-22 15:38:06 +01:00
Michael Walker
875f4f005e Add GHC 9.2 to supported versions list
No bounds need changing for this, so no release is needed.
2022-08-22 15:13:44 +01:00
Michael Walker
9ea0eb8115 Bump upper bound on leancheck to <2 2022-08-22 15:09:39 +01:00
Michael Walker
a032cf0f7c
Merge pull request #357 from barrucadu/lts-19
Add LTS-19.0 to build matrix & supported GHC versions doc
2022-08-22 15:09:25 +01:00
Michael Walker
11ccf950e7 Add LTS-19.0 to build matrix & supported GHC versions doc
There should be a patch release of dejafu after this, since the
doctest examples changed.

Also, need to bump to a nightly snapshot in `stack.yaml` for
stylish-haskell, which looks to have skipped GHC 9.0 support.

In principle, we could now drop support for GHC 8.0, 8.2, and 8.4, but
supporting those isn't causing any problems yet.
2022-08-22 14:40:35 +01:00
13 changed files with 34 additions and 15 deletions

View File

@ -51,6 +51,7 @@ jobs:
- lts-13.3 # ghc-8.6
- lts-15.0 # ghc-8.8
- lts-17.0 # ghc-8.10
- lts-19.0 # ghc-9.0
steps:
- uses: actions/checkout@v3

View File

@ -51,3 +51,8 @@
- ignore: {name: "Alternative law, right identity", within: Examples.ClassLaws}
- ignore: {name: "Alternative law, left identity", within: Examples.ClassLaws}
- ignore: {name: "Monoid law, right identity", within: Unit.Properties}
# Not implemented
- ignore: {name: "Use newEmptyTMVarIO"}
- ignore: {name: "Use newTMVarIO"}
- ignore: {name: "Use newTVarIO"}

View File

@ -43,7 +43,7 @@ There are a few different packages under the Déjà Fu umbrella:
| | Version | Summary |
| - | ------- | ------- |
| [concurrency][h:conc] | 1.11.0.2 | Typeclasses, functions, and data types for concurrency and STM. |
| [dejafu][h:dejafu] | 2.4.0.3 | Systematic testing for Haskell concurrency. |
| [dejafu][h:dejafu] | 2.4.0.4 | Systematic testing for Haskell concurrency. |
| [hunit-dejafu][h:hunit] | 2.0.0.5 | Deja Fu support for the HUnit test framework. |
| [tasty-dejafu][h:tasty] | 2.0.0.8 | Deja Fu support for the Tasty test framework. |

View File

@ -754,7 +754,7 @@ forConcurrently_ = flip mapConcurrently_
--
-- @since 1.1.2.0
replicateConcurrently :: MonadConc m => Int -> m a -> m [a]
replicateConcurrently i = runConcurrently . sequenceA . replicate i . Concurrently
replicateConcurrently i = runConcurrently . replicateM i . Concurrently
-- | 'replicateConcurrently_' is 'replicateConcurrently' with the
-- return values discarded.

View File

@ -16,10 +16,9 @@ tests = toTestList
parFilter :: (MonadConc m, MonadIO m) => m Bool
parFilter = do
let p x = x `mod` 2 == 0
let xs = [0..1] :: [Int]
s <- Par.runParIO $ parfilter p xs
pure (s == filter p xs)
s <- Par.runParIO $ parfilter even xs
pure (s == filter even xs)
where
parfilter _ [] = pure []
parfilter f [x] = pure [x | f x]

View File

@ -6,6 +6,18 @@ standard Haskell versioning scheme.
.. _PVP: https://pvp.haskell.org/
2.4.0.4 (2022-08-22)
--------------------
* Git: :tag:`dejafu-2.4.0.4`
* Hackage: :hackage:`dejafu-2.4.0.4`
Miscellaneous
~~~~~~~~~~~~~
* Update doctest examples in `Test.DejaFu`.
* The upper bound on :hackage:`leancheck` is <2.
2.4.0.3 (2021-08-15)
--------------------

View File

@ -491,7 +491,7 @@ dejafu = dejafuWithSettings defaultSettings
-- [fail] Randomly!
-- "hello" S0----S1--S0--
-- <BLANKLINE>
-- "world" S0----S2--S1-S0--
-- "world" S0---P2--S0--
-- False
--
-- @since 2.1.0.0
@ -517,7 +517,7 @@ dejafuWay way = dejafuWithSettings . fromWayAndMemType way
-- [fail] Randomly!
-- "hello" S0----S1--S0--
-- <BLANKLINE>
-- "world" S0----S2--S1-S0--
-- "world" S0---P2--S0--
-- False
--
-- @since 2.1.0.0

View File

@ -57,6 +57,7 @@ module Test.DejaFu.Conc
) where
import Control.Exception (MaskingState(..))
import Control.Monad (void)
import Test.DejaFu.Conc.Internal.Common
import Test.DejaFu.Conc.Internal.Program
@ -164,7 +165,7 @@ withSetupAndTeardown setup teardown =
--
-- @since 2.0.0.0
registerInvariant :: Invariant n a -> Program Basic n ()
registerInvariant inv = ModelConc (\c -> ANewInvariant (() <$ inv) (c ()))
registerInvariant inv = ModelConc (\c -> ANewInvariant (void inv) (c ()))
-- | Read the content of an @IORef@.
--

View File

@ -81,7 +81,7 @@ propagate e tid threads = raise <$> propagate' handlers where
raise (ms, act, hs) = except ms act hs tid threads
propagate' [] = Nothing
propagate' (Handler ms h:hs) = maybe (propagate' hs) (\act -> Just (ms, act, hs)) $ h <$> fromException e
propagate' (Handler ms h:hs) = maybe (propagate' hs) ((\act -> Just (ms, act, hs)) . h) (fromException e)
-- | Check if a thread can be interrupted by an exception.
interruptible :: Thread n -> Bool

View File

@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/
name: dejafu
version: 2.4.0.3
version: 2.4.0.4
synopsis: A library for unit-testing concurrent programs.
description:
@ -33,7 +33,7 @@ source-repository head
source-repository this
type: git
location: https://github.com/barrucadu/dejafu.git
tag: dejafu-2.4.0.3
tag: dejafu-2.4.0.4
library
exposed-modules: Test.DejaFu
@ -64,7 +64,7 @@ library
, contravariant >=1.2 && <1.6
, deepseq >=1.1 && <2
, exceptions >=0.7 && <0.11
, leancheck >=0.6 && <0.10
, leancheck >=0.6 && <2
, profunctors >=4.0 && <6
, random >=1.0 && <1.3
, transformers >=0.5 && <0.6

View File

@ -28,7 +28,7 @@ There are a few different packages under the Déjà Fu umbrella:
:header: "Package", "Version", "Summary"
":hackage:`concurrency`", "1.11.0.2", "Typeclasses, functions, and data types for concurrency and STM"
":hackage:`dejafu`", "2.4.0.3", "Systematic testing for Haskell concurrency"
":hackage:`dejafu`", "2.4.0.4", "Systematic testing for Haskell concurrency"
":hackage:`hunit-dejafu`", "2.0.0.5", "Déjà Fu support for the HUnit test framework"
":hackage:`tasty-dejafu`", "2.0.0.8", "Déjà Fu support for the tasty test framework"

View File

@ -8,7 +8,8 @@ currently supported versions are:
.. csv-table::
:header: "GHC", "Stackage", "base"
"9.0", "", "4.15.0.0"
"9.2", "", "4.16.0.0"
"9.0", "LTS 19.0", "4.15.0.0"
"8.10", "LTS 17.0", "4.14.1.0"
"8.8", "LTS 15.0", "4.13.0.0"
"8.6", "LTS 13.0", "4.12.0.0"

View File

@ -1,4 +1,4 @@
resolver: lts-15.0
resolver: nightly-2022-07-01
packages:
- concurrency