chp-plus 1.0.0 → 1.0.1
raw patch · 2 files changed
+5/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Control/Concurrent/CHP/Test.hs +4/−4
- chp-plus.cabal +1/−1
Control/Concurrent/CHP/Test.hs view
@@ -42,7 +42,7 @@ import Data.Unique import Test.HUnit (assertFailure, Test(..)) import Test.QuickCheck (Gen, forAll)-import Test.QuickCheck.Property (Property, Result(..), Testable(..), failed, succeeded, liftIOResult)+import Test.QuickCheck.Property (Property, Result(..), Testable(..), result, succeeded, liftIOResult) import Text.PrettyPrint.HughesPJ import Control.Concurrent.CHP@@ -77,14 +77,14 @@ do (mr, t) <- m case mr of Just r -> return $ r { reason = reason r ++ "; trace: " ++ show t }- Nothing -> return $ failed { reason = "QuickCheckCHP Failure (deadlock/uncaught poison); trace: " ++ show t }+ Nothing -> return $ result { ok = Just False, reason = "QuickCheckCHP Failure (deadlock/uncaught poison); trace: " ++ show t } chpToQC :: CHPTestResult -> Result chpToQC (CHPTestPass) = succeeded-chpToQC (CHPTestFail msg) = failed { reason = msg }+chpToQC (CHPTestFail msg) = result { ok = Just False, reason = msg } boolToResult :: Bool -> Result-boolToResult b = if b then succeeded else failed+boolToResult b = if b then succeeded else result { ok = Just False } instance Testable (QuickCheckCHP Bool) where property (QCCHP x) = qcResult $ liftM (first $ fmap boolToResult) x
chp-plus.cabal view
@@ -1,5 +1,5 @@ Name: chp-plus-Version: 1.0.0+Version: 1.0.1 Synopsis: A set of high-level concurrency utilities built on Communicating Haskell Processes License: BSD3 License-file: LICENSE