polysemy-test 0.8.0.1 → 0.9.0.0
raw patch · 3 files changed
+17/−5 lines, 3 files
Files
- lib/Polysemy/Test.hs +2/−0
- lib/Polysemy/Test/Run.hs +14/−4
- polysemy-test.cabal +1/−1
lib/Polysemy/Test.hs view
@@ -33,6 +33,7 @@ assertClose, interpretHedgehog, -- * Running 'Hedgehog' and 'Test' as 'TestT'+ runTestAutoWith, runTestAuto, runTest, runTestInSubdir,@@ -81,6 +82,7 @@ interpretTestKeepTemp, runTest, runTestAuto,+ runTestAutoWith, runTestInSubdir, semToTestT, semToTestTFinal,
lib/Polysemy/Test/Run.hs view
@@ -204,11 +204,21 @@ -- |Wrapper for 'semToTestT' that uses the call stack to determine the base dir of the test run. -- Note that if you wrap this function, you'll have to use the 'HasCallStack' constraint to supply the implicit -- 'GHC.Stack.Types.CallStack'.-runTestAuto ::+runTestAutoWith :: HasCallStack =>- Sem [Test, Fail, Error TestError, Hedgehog IO, Error Failure, Embed IO, Resource, Final IO] a ->+ Members [Resource, Embed IO] r =>+ (∀ x . Sem r x -> IO x) ->+ Sem (Test : Fail : Error TestError : Hedgehog IO : Error Failure : r) a -> TestT IO a-runTestAuto sem =- semToTestT (runFinal . resourceToIOFinal . embedToFinal) do+runTestAutoWith runSem sem =+ semToTestT runSem do base <- callingTestDir interpretTest base sem++-- |Version of 'runTestAutoWith' specialized to @'Final' IO@+runTestAuto ::+ HasCallStack =>+ Sem [Test, Fail, Error TestError, Hedgehog IO, Error Failure, Embed IO, Resource, Final IO] a ->+ TestT IO a+runTestAuto =+ runTestAutoWith (runFinal . resourceToIOFinal . embedToFinal)
polysemy-test.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: polysemy-test-version: 0.8.0.1+version: 0.9.0.0 synopsis: Polysemy effects for testing description: See https://hackage.haskell.org/package/polysemy-test/docs/Polysemy-Test.html category: Test