mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-09-11 06:25:45 +03:00
Compare commits
8 Commits
76e4dbc04e
...
ee73a6ac27
Author | SHA1 | Date | |
---|---|---|---|
|
ee73a6ac27 | ||
|
e7c466ed5c | ||
|
38aa7dc407 | ||
|
469f52036c | ||
|
875f4f005e | ||
|
9ea0eb8115 | ||
|
a032cf0f7c | ||
|
11ccf950e7 |
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
@ -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
|
||||
|
@ -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"}
|
||||
|
@ -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. |
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
--------------------
|
||||
|
@ -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
|
||||
|
@ -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@.
|
||||
--
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -1,4 +1,4 @@
|
||||
resolver: lts-15.0
|
||||
resolver: nightly-2022-07-01
|
||||
|
||||
packages:
|
||||
- concurrency
|
||||
|
Loading…
Reference in New Issue
Block a user