effectful-zoo 0.0.3.0 → 0.0.3.1
raw patch · 4 files changed
+20/−4 lines, 4 files
Files
- components/core/Effectful/Zoo/FileSystem.hs +15/−0
- components/hedgehog/Effectful/Zoo/Hedgehog/Api/Tasty/Orphans.hs +2/−1
- components/hedgehog/Effectful/Zoo/Hedgehog/Effect/Run.hs +2/−2
- effectful-zoo.cabal +1/−1
components/core/Effectful/Zoo/FileSystem.hs view
@@ -17,6 +17,7 @@ runFileSystem, getCurrentDirectory,+ listDirectory, canonicalizePath, ) where @@ -204,3 +205,17 @@ unsafeFileSystemEff_ (D.canonicalizePath fp) & trapIO @IOException throw {-# INLINE canonicalizePath #-}++listDirectory :: ()+ => HasCallStack+ => r <: Error IOException+ => r <: FileSystem+ => r <: Log Text+ => FilePath+ -> Eff r [FilePath]+listDirectory fp = withFrozenCallStack do+ info $ "Calling: listDirectory " <> tshow fp++ unsafeFileSystemEff_ (D.listDirectory fp)+ & trapIO @IOException throw+{-# INLINE listDirectory #-}
components/hedgehog/Effectful/Zoo/Hedgehog/Api/Tasty/Orphans.hs view
@@ -15,4 +15,5 @@ where testName = fromMaybe "" $ getLast info.name instance Tasty (TestT IO ()) where- tasty info = tasty info . H.test+ tasty info = pure . testProperty testName . H.withTests 1 . H.property . H.test+ where testName = fromMaybe "" $ getLast info.name
components/hedgehog/Effectful/Zoo/Hedgehog/Effect/Run.hs view
@@ -75,8 +75,8 @@ Nothing -> do mResult <- CC.tryTakeTMVar tvResult case mResult of- Nothing -> pure Nothing Just a -> pure $ Just $ Right a+ Nothing -> retry Just action -> pure $ Just $ Left action case mActionOrResult of@@ -132,8 +132,8 @@ Nothing -> do mResult <- CC.tryTakeTMVar tvResult case mResult of- Nothing -> pure Nothing Just a -> pure $ Just $ Right a+ Nothing -> retry Just action -> pure $ Just $ Left action case mActionOrResult of
effectful-zoo.cabal view
@@ -1,7 +1,7 @@ cabal-version: 3.4 name: effectful-zoo-version: 0.0.3.0+version: 0.0.3.1 synopsis: Effectful effects for testing description: See https://hackage.haskell.org/package/effectful-zoo/docs/effectful-zoo.html category: Development