inbox 0.1.0 → 0.2.0
raw patch · 2 files changed
+10/−7 lines, 2 filesdep ~error-orPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: error-or
API changes (from Hackage documentation)
Files
- inbox.cabal +6/−5
- src/Test/Inbox.hs +4/−2
inbox.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack ----- hash: 2c277fd6868c767ff3555a498d12d4d499aa79026f19309cba962439e1170c19+-- hash: 0ac923d71c1da772bbdfa20bc264b7bba8941101637cf5af6ba85eda130bc10b name: inbox-version: 0.1.0+version: 0.2.0 synopsis: Inbox for asychronous messages description: Facilitates testing of asynchronous behavior category: Testing@@ -17,7 +17,8 @@ copyright: 2020 Kamil Dworakowski license: BSD3 license-file: LICENSE-tested-with: GHC==8.0.1, GHC==8.2.2, GHC==8.8.1, GHC==8.8.3, GHC==8.10.2+tested-with:+ GHC==8.0.1, GHC==8.2.2, GHC==8.8.1, GHC==8.8.3, GHC==8.10.2 build-type: Simple extra-source-files: README.md@@ -32,7 +33,7 @@ build-depends: async , base >=4.7 && <5- , error-or+ , error-or >=0.2.0.0 , text , time default-language: Haskell2010
src/Test/Inbox.hs view
@@ -49,6 +49,8 @@ import Data.Time #if __GLASGOW_HASKELL__ < 880+import Prelude hiding (fail) -- out with the old, Monad.fail+import Control.Monad.Fail (fail) -- in with the new, MonadFail.fail import Data.Semigroup #endif @@ -164,7 +166,7 @@ xs <- messages <$> readIORef r case xs of [] -> pure (pure ())- _ -> return . tag "Unconsumed messages" . sequenceA_ . map (err . T.pack . show) $ xs+ _ -> return . tag "Unconsumed messages" . sequenceA_ . map (fail . show) $ xs -- | Validate that the filter does not match anything in the Inbox. expectEmpty' :: (Show a, MonadIO m) => Inbox a -> Filter a b -> m ()@@ -175,4 +177,4 @@ . toE . tag ("There are msgs matching " <> name) . sequenceA_- . map ((err :: T.Text -> ErrorOr ()) . T.pack . show) $ elems+ . map (fail . show) $ elems