hedgehog-extras 0.3.0.2 → 0.3.0.3
raw patch · 2 files changed
+6/−4 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Hedgehog.Extras.Test.Base: moduleWorkspace :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> (FilePath -> m ()) -> m ()
+ Hedgehog.Extras.Test.Base: moduleWorkspace :: (MonadTest m, MonadIO m, HasCallStack) => String -> (FilePath -> m ()) -> m ()
Files
hedgehog-extras.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: hedgehog-extras-version: 0.3.0.2+version: 0.3.0.3 synopsis: Supplemental library for hedgehog description: Supplemental library for hedgehog. category: Test
src/Hedgehog/Extras/Test/Base.hs view
@@ -156,10 +156,12 @@ -- -- The directory will be deleted if the block succeeds, but left behind if -- the block fails.-moduleWorkspace :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> (FilePath -> m ()) -> m ()-moduleWorkspace prefixPath f = GHC.withFrozenCallStack $ do+--+-- The 'prefix' argument should not contain directory delimeters.+moduleWorkspace :: (MonadTest m, MonadIO m, HasCallStack) => String -> (FilePath -> m ()) -> m ()+moduleWorkspace prefix f = GHC.withFrozenCallStack $ do let srcModule = maybe "UnknownModule" (GHC.srcLocModule . snd) (listToMaybe (GHC.getCallStack GHC.callStack))- workspace (prefixPath <> "/" <> srcModule) f+ workspace (prefix <> "-" <> srcModule) f -- | Annotate the given string at the context supplied by the callstack. noteWithCallstack :: MonadTest m => CallStack -> String -> m ()