-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Imperative approach to testing stateful applications. ImpSpec is build on top of HSpec and QuickCheck -- -- Let a little imp help you discover all the bugs in your stateful -- Haskell program. @package ImpSpec @version 0.1.0.0 module Test.ImpSpec.Expectations -- | Asserts that the specified condition holds. assertBool :: HasCallStack => String -> Bool -> Assertion -- | Unconditionally signals that a failure has occurred. assertFailure :: HasCallStack => String -> IO a expectationFailure :: HasCallStack => String -> Expectation -- | actual `shouldBe` expected sets the expectation that -- actual is equal to expected. shouldBe :: (HasCallStack, Show a, Eq a) => a -> a -> Expectation infix 1 `shouldBe` -- | v `shouldSatisfy` p sets the expectation that p v is -- True. shouldSatisfy :: (HasCallStack, Show a) => a -> (a -> Bool) -> Expectation infix 1 `shouldSatisfy` -- | list `shouldStartWith` prefix sets the expectation that -- list starts with prefix, shouldStartWith :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation infix 1 `shouldStartWith` -- | list `shouldEndWith` suffix sets the expectation that -- list ends with suffix, shouldEndWith :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation infix 1 `shouldEndWith` -- | list `shouldContain` sublist sets the expectation that -- sublist is contained, wholly and intact, anywhere in -- list. shouldContain :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation infix 1 `shouldContain` -- | xs `shouldMatchList` ys sets the expectation that xs -- has the same elements that ys has, possibly in another order shouldMatchList :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation infix 1 `shouldMatchList` -- | action `shouldReturn` expected sets the expectation that -- action returns expected. shouldReturn :: (HasCallStack, Show a, Eq a) => IO a -> a -> Expectation infix 1 `shouldReturn` -- | actual `shouldNotBe` notExpected sets the expectation that -- actual is not equal to notExpected shouldNotBe :: (HasCallStack, Show a, Eq a) => a -> a -> Expectation infix 1 `shouldNotBe` -- | v `shouldNotSatisfy` p sets the expectation that p v -- is False. shouldNotSatisfy :: (HasCallStack, Show a) => a -> (a -> Bool) -> Expectation infix 1 `shouldNotSatisfy` -- | list `shouldNotContain` sublist sets the expectation that -- sublist is not contained anywhere in list. shouldNotContain :: (HasCallStack, Show a, Eq a) => [a] -> [a] -> Expectation infix 1 `shouldNotContain` -- | action `shouldNotReturn` notExpected sets the expectation -- that action does not return notExpected. shouldNotReturn :: (HasCallStack, Show a, Eq a) => IO a -> a -> Expectation infix 1 `shouldNotReturn` -- | action `shouldThrow` selector sets the expectation that -- action throws an exception. The precise nature of the -- expected exception is described with a Selector. shouldThrow :: (HasCallStack, Exception e) => IO a -> Selector e -> Expectation infix 1 `shouldThrow` -- | A Selector is a predicate; it can simultaneously constrain -- the type and value of an exception. type Selector a = a -> Bool -- | Similar to assertFailure, except hspec will not interfer with -- any escape sequences that indicate color output. assertColorFailure :: HasCallStack => String -> IO a -- | Same as shouldBe, except it checks that the value is -- Right shouldBeRight :: (HasCallStack, Show a, Show b, Eq b) => Either a b -> b -> Expectation infix 1 `shouldBeRight` -- | Same as shouldBe, except it checks that the value is -- Left shouldBeLeft :: (HasCallStack, Show a, Eq a, Show b) => Either a b -> a -> Expectation infix 1 `shouldBeLeft` -- | Return value on the Right and fail otherwise. -- -- Difference from shouldSatisfy action isRight in -- that expectRight will force the content of the Right to -- WHNF and return it. This expectation will also show the content of the -- Left when expectation fails. expectRight :: (HasCallStack, Show a) => Either a b -> IO b -- | Same as expectRight, but also evaluate the returned value to NF expectRightDeep :: (HasCallStack, Show a, NFData b) => Either a b -> IO b -- | Same as expectRightDeep, but discards the result expectRightDeep_ :: (HasCallStack, Show a, NFData b) => Either a b -> IO () -- | Return value on the Left an fail otherwise -- -- Difference from shouldSatisfy action isLeft in -- that expectLeft will force the content of the Left to -- WHNF and and return it. This expectation will also show the content of -- the Right when expectation fails. expectLeft :: (HasCallStack, Show b) => Either a b -> IO a -- | Same as expectLeft, but also evaluate the returned value to NF expectLeftDeep :: (HasCallStack, NFData a, Show b) => Either a b -> IO a -- | Same as expectLeftDeep, but discards the result expectLeftDeep_ :: (HasCallStack, NFData a, Show b) => Either a b -> IO () -- | Same as shouldBe, except it checks that the value is -- Just shouldBeJust :: (HasCallStack, Show a, Eq a) => Maybe a -> a -> Expectation -- | Return value from the Just an fail otherwise -- -- Difference from shouldSatisfy action isJust -- in that expectJust will force the content of the Just to -- WHNF and it will also return it. expectJust :: HasCallStack => Maybe a -> IO a -- | Same as expectJust, but will force the value to NF expectJustDeep :: (HasCallStack, NFData a) => Maybe a -> IO a -- | Same as expectJustDeep, but will discard the forced contents of -- Just expectJustDeep_ :: (HasCallStack, NFData a) => Maybe a -> IO () -- | Same as shouldSatisfy action isNothing expectNothing :: (HasCallStack, Show a) => Maybe a -> IO () -- | Convert the top call from the CallStack to hspec's -- Location callStackToLocation :: CallStack -> Maybe Location -- | Convert SrcLoc to hspec's Location srcLocToLocation :: SrcLoc -> Location module Test.ImpSpec.Expectations.Lifted -- | Enforce the type of expectation -- -- Useful with polymorphic expectations that are defined below. -- --

Example

-- -- Because shouldBeExpr is polymorphic in m, compiler -- will choke with a unification error. This is due to the fact that -- hspec's it expects a polymorphic Example. -- --
--   it "MyTest" $ do
--     "foo" `shouldBeExpr` "bar"
--   
-- -- However, this is easily solved by io: -- --
--   it "MyTest" $ io $ do
--     "foo" `shouldBeExpr` "bar"
--   
io :: IO a -> IO a -- | Lifted version of assertBool assertBool :: (HasCallStack, MonadIO m) => String -> Bool -> m () -- | Just like expectationFailure, but does not force the return -- type to unit. Lifted version of assertFailure assertFailure :: (HasCallStack, MonadIO m) => String -> m a expectationFailure :: (HasCallStack, MonadIO m) => String -> m () -- | actual `shouldBe` expected sets the expectation that -- actual is equal to expected. shouldBe :: (HasCallStack, MonadIO m, Show a, Eq a) => a -> a -> m () infix 1 `shouldBe` -- | v `shouldSatisfy` p sets the expectation that p v is -- True. shouldSatisfy :: (HasCallStack, MonadIO m, Show a) => a -> (a -> Bool) -> m () infix 1 `shouldSatisfy` -- | list `shouldStartWith` prefix sets the expectation that -- list starts with prefix, shouldStartWith :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldStartWith` -- | list `shouldEndWith` suffix sets the expectation that -- list ends with suffix, shouldEndWith :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldEndWith` -- | list `shouldContain` sublist sets the expectation that -- sublist is contained, wholly and intact, anywhere in -- list. shouldContain :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldContain` -- | xs `shouldMatchList` ys sets the expectation that xs -- has the same elements that ys has, possibly in another order shouldMatchList :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldMatchList` -- | action `shouldReturn` expected sets the expectation that -- action returns expected. shouldReturn :: (HasCallStack, MonadIO m, Show a, Eq a) => m a -> a -> m () infix 1 `shouldReturn` -- | actual `shouldNotBe` notExpected sets the expectation that -- actual is not equal to notExpected shouldNotBe :: (HasCallStack, MonadIO m, Show a, Eq a) => a -> a -> m () infix 1 `shouldNotBe` -- | v `shouldNotSatisfy` p sets the expectation that p v -- is False. shouldNotSatisfy :: (HasCallStack, MonadIO m, Show a) => a -> (a -> Bool) -> m () infix 1 `shouldNotSatisfy` -- | list `shouldNotContain` sublist sets the expectation that -- sublist is not contained anywhere in list. shouldNotContain :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldNotContain` -- | action `shouldNotReturn` notExpected sets the expectation -- that action does not return notExpected. shouldNotReturn :: (HasCallStack, MonadIO m, Show a, Eq a) => m a -> a -> m () infix 1 `shouldNotReturn` -- | Lifted version of shouldThrow. shouldThrow :: (HasCallStack, Exception e, MonadUnliftIO m) => m a -> Selector e -> m () infix 1 `shouldThrow` -- | A Selector is a predicate; it can simultaneously constrain -- the type and value of an exception. type Selector a = a -> Bool assertColorFailure :: (HasCallStack, MonadIO m) => String -> m a -- | Same as shouldBe, except it checks that the value is -- Right shouldBeRight :: (HasCallStack, Show a, Show b, Eq b, MonadIO m) => Either a b -> b -> m () infix 1 `shouldBeRight` -- | Same as shouldBe, except it checks that the value is -- Left shouldBeLeft :: (HasCallStack, Show a, Eq a, Show b, MonadIO m) => Either a b -> a -> m () infix 1 `shouldBeLeft` -- | Return value on the Right and fail otherwise. Lifted version of -- expectRight. expectRight :: (HasCallStack, Show a, MonadIO m) => Either a b -> m b -- | Same as expectRight, but also evaluate the returned value to NF expectRightDeep :: (HasCallStack, Show a, NFData b, MonadIO m) => Either a b -> m b -- | Same as expectRightDeep, but discards the result expectRightDeep_ :: (HasCallStack, Show a, NFData b, MonadIO m) => Either a b -> m () -- | Return value on the Left and fail otherwise expectLeft :: (HasCallStack, Show b, MonadIO m) => Either a b -> m a -- | Same as expectLeft, but also evaluate the returned value to NF expectLeftDeep :: (HasCallStack, NFData a, Show b, MonadIO m) => Either a b -> m a -- | Same as expectLeftDeep, but discards the result expectLeftDeep_ :: (HasCallStack, NFData a, Show b, MonadIO m) => Either a b -> m () -- | Same as shouldBe, except it checks that the value is -- Just shouldBeJust :: (HasCallStack, Show a, Eq a, MonadIO m) => Maybe a -> a -> m () expectJust :: (HasCallStack, MonadIO m) => Maybe a -> m a expectJustDeep :: (HasCallStack, NFData a, MonadIO m) => Maybe a -> m a expectJustDeep_ :: (HasCallStack, NFData a, MonadIO m) => Maybe a -> m () expectNothing :: (HasCallStack, Show a, MonadIO m) => Maybe a -> m () module Test.ImpSpec.Main impSpecMain :: Spec -> IO () impSpecConfig :: Config impSpecMainWithConfig :: Config -> Spec -> IO () module Test.ImpSpec.Random class StatefulGen g m => HasStatefulGen g m | m -> g askStatefulGen :: HasStatefulGen g m => m g askStatefulGen :: (HasStatefulGen g m, MonadReader g m) => m g class HasGenEnv env g | env -> g getGenEnv :: HasGenEnv env g => env -> g uniformM :: (HasStatefulGen g m, Uniform a) => m a uniformRM :: (HasStatefulGen g m, UniformRange a) => (a, a) -> m a uniformListM :: (HasStatefulGen g m, Uniform a) => Int -> m [a] uniformListRM :: (HasStatefulGen g m, UniformRange a) => (a, a) -> Int -> m [a] uniformByteStringM :: HasStatefulGen a m => Int -> m ByteString uniformShortByteStringM :: HasStatefulGen a m => Int -> m ShortByteString -- | Lifted version of arbitrary. arbitrary :: (Arbitrary a, MonadGen m) => m a instance Test.ImpSpec.Random.HasGenEnv g g instance (Test.ImpSpec.Random.HasGenEnv env g, System.Random.Internal.StatefulGen g (Control.Monad.Trans.Reader.ReaderT env m), GHC.Base.Monad m) => Test.ImpSpec.Random.HasStatefulGen g (Control.Monad.Trans.Reader.ReaderT env m) module Test.ImpSpec -- | A Selector is a predicate; it can simultaneously constrain -- the type and value of an exception. type Selector a = a -> Bool type SpecWith a = SpecM a () type Spec = SpecWith () class ImpSpec t where { type ImpSpecEnv t = (r :: Type) | r -> t; type ImpSpecState t = (r :: Type) | r -> t; type ImpSpecEnv t = Proxy t; type ImpSpecState t = Proxy t; } impInitIO :: ImpSpec t => QCGen -> IO (ImpInit t) impInitIO :: (ImpSpec t, ImpSpecEnv t ~ Proxy t, ImpSpecState t ~ Proxy t) => QCGen -> IO (ImpInit t) -- | This will be the very first action that will run in all ImpM -- specs. impPrepAction :: ImpSpec t => ImpM t () class StatefulGen g m => HasStatefulGen g m | m -> g askStatefulGen :: HasStatefulGen g m => m g askStatefulGen :: (HasStatefulGen g m, MonadReader g m) => m g class HasGenEnv env g | env -> g getGenEnv :: HasGenEnv env g => env -> g data ImpState t ImpState :: !ImpSpecState t -> !Doc AnsiStyle -> ImpState t [impStateSpecState] :: ImpState t -> !ImpSpecState t [impStateLog] :: ImpState t -> !Doc AnsiStyle data ImpEnv t ImpEnv :: !ImpSpecEnv t -> !IORef (ImpState t) -> !IOGenM QCGen -> !Int -> ImpEnv t [impEnvSpecEnv] :: ImpEnv t -> !ImpSpecEnv t [impEnvStateRef] :: ImpEnv t -> !IORef (ImpState t) [impEnvQCGenRef] :: ImpEnv t -> !IOGenM QCGen [impEnvQCSize] :: ImpEnv t -> !Int data ImpInit t ImpInit :: ImpSpecEnv t -> ImpSpecState t -> ImpInit t [impInitEnv] :: ImpInit t -> ImpSpecEnv t [impInitState] :: ImpInit t -> ImpSpecState t newtype ImpM t a ImpM :: ReaderT (ImpEnv t) IO a -> ImpM t a [unImpM] :: ImpM t a -> ReaderT (ImpEnv t) IO a -- | Stores extra information about the failure of the unit test data ImpException ImpException :: [Doc AnsiStyle] -> SomeException -> ImpException -- | Description of the IO action that caused the failure [ieAnnotation] :: ImpException -> [Doc AnsiStyle] -- | Exception that caused the test to fail [ieThrownException] :: ImpException -> SomeException -- | Just like expectationFailure, but does not force the return -- type to unit. Lifted version of assertFailure assertFailure :: (HasCallStack, MonadIO m) => String -> m a -- | Lifted version of assertBool assertBool :: (HasCallStack, MonadIO m) => String -> Bool -> m () -- | Lifted version of arbitrary. arbitrary :: (Arbitrary a, MonadGen m) => m a -- | The describe function combines a list of specs into a larger -- spec. describe :: HasCallStack => String -> SpecWith a -> SpecWith a -- | Changing describe to xdescribe marks all spec items of -- the corresponding subtree as pending. -- -- This can be used to temporarily disable spec items. xdescribe :: HasCallStack => String -> SpecWith a -> SpecWith a -- | The it function creates a spec item. -- -- A spec item consists of: -- -- -- --
--   describe "absolute" $ do
--     it "returns a positive number when given a negative number" $
--       absolute (-1) == 1
--   
it :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) -- | Changing it to xit marks the corresponding spec item as -- pending. -- -- This can be used to temporarily disable a spec item. xit :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) -- | fit is an alias for fmap focus . it fit :: (HasCallStack, Example a) => String -> a -> SpecWith (Arg a) -- | fdescribe is an alias for fmap focus . describe fdescribe :: HasCallStack => String -> SpecWith a -> SpecWith a -- |
--   prop ".." $
--     ..
--   
-- -- is a shortcut for -- --
--   it ".." $ property $
--     ..
--   
prop :: (HasCallStack, Testable prop) => String -> prop -> Spec -- |
--   xprop ".." $
--     ..
--   
-- -- is a shortcut for -- --
--   xit ".." $ property $
--     ..
--   
xprop :: (HasCallStack, Testable prop) => String -> prop -> Spec -- |
--   fprop ".." $
--     ..
--   
-- -- is a shortcut for -- --
--   fit ".." $ property $
--     ..
--   
fprop :: (HasCallStack, Testable prop) => String -> prop -> Spec expectationFailure :: (HasCallStack, MonadIO m) => String -> m () -- | actual `shouldBe` expected sets the expectation that -- actual is equal to expected. shouldBe :: (HasCallStack, MonadIO m, Show a, Eq a) => a -> a -> m () infix 1 `shouldBe` -- | v `shouldSatisfy` p sets the expectation that p v is -- True. shouldSatisfy :: (HasCallStack, MonadIO m, Show a) => a -> (a -> Bool) -> m () infix 1 `shouldSatisfy` -- | list `shouldStartWith` prefix sets the expectation that -- list starts with prefix, shouldStartWith :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldStartWith` -- | list `shouldEndWith` suffix sets the expectation that -- list ends with suffix, shouldEndWith :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldEndWith` -- | list `shouldContain` sublist sets the expectation that -- sublist is contained, wholly and intact, anywhere in -- list. shouldContain :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldContain` -- | xs `shouldMatchList` ys sets the expectation that xs -- has the same elements that ys has, possibly in another order shouldMatchList :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldMatchList` -- | action `shouldReturn` expected sets the expectation that -- action returns expected. shouldReturn :: (HasCallStack, MonadIO m, Show a, Eq a) => m a -> a -> m () infix 1 `shouldReturn` -- | actual `shouldNotBe` notExpected sets the expectation that -- actual is not equal to notExpected shouldNotBe :: (HasCallStack, MonadIO m, Show a, Eq a) => a -> a -> m () infix 1 `shouldNotBe` -- | v `shouldNotSatisfy` p sets the expectation that p v -- is False. shouldNotSatisfy :: (HasCallStack, MonadIO m, Show a) => a -> (a -> Bool) -> m () infix 1 `shouldNotSatisfy` -- | list `shouldNotContain` sublist sets the expectation that -- sublist is not contained anywhere in list. shouldNotContain :: (HasCallStack, MonadIO m, Show a, Eq a) => [a] -> [a] -> m () infix 1 `shouldNotContain` -- | action `shouldNotReturn` notExpected sets the expectation -- that action does not return notExpected. shouldNotReturn :: (HasCallStack, MonadIO m, Show a, Eq a) => m a -> a -> m () infix 1 `shouldNotReturn` -- | Lifted version of shouldThrow. shouldThrow :: (HasCallStack, Exception e, MonadUnliftIO m) => m a -> Selector e -> m () infix 1 `shouldThrow` uniformM :: (HasStatefulGen g m, Uniform a) => m a uniformRM :: (HasStatefulGen g m, UniformRange a) => (a, a) -> m a uniformByteStringM :: HasStatefulGen a m => Int -> m ByteString uniformListM :: (HasStatefulGen g m, Uniform a) => Int -> m [a] assertColorFailure :: (HasCallStack, MonadIO m) => String -> m a -- | Same as shouldBe, except it checks that the value is -- Right shouldBeRight :: (HasCallStack, Show a, Show b, Eq b, MonadIO m) => Either a b -> b -> m () infix 1 `shouldBeRight` -- | Same as shouldBe, except it checks that the value is -- Left shouldBeLeft :: (HasCallStack, Show a, Eq a, Show b, MonadIO m) => Either a b -> a -> m () infix 1 `shouldBeLeft` -- | Return value on the Right and fail otherwise. Lifted version of -- expectRight. expectRight :: (HasCallStack, Show a, MonadIO m) => Either a b -> m b -- | Same as expectRight, but also evaluate the returned value to NF expectRightDeep :: (HasCallStack, Show a, NFData b, MonadIO m) => Either a b -> m b -- | Same as expectRightDeep, but discards the result expectRightDeep_ :: (HasCallStack, Show a, NFData b, MonadIO m) => Either a b -> m () -- | Return value on the Left and fail otherwise expectLeft :: (HasCallStack, Show b, MonadIO m) => Either a b -> m a -- | Same as expectLeft, but also evaluate the returned value to NF expectLeftDeep :: (HasCallStack, NFData a, Show b, MonadIO m) => Either a b -> m a -- | Same as expectLeftDeep, but discards the result expectLeftDeep_ :: (HasCallStack, NFData a, Show b, MonadIO m) => Either a b -> m () -- | Same as shouldBe, except it checks that the value is -- Just shouldBeJust :: (HasCallStack, Show a, Eq a, MonadIO m) => Maybe a -> a -> m () expectJust :: (HasCallStack, MonadIO m) => Maybe a -> m a expectJustDeep :: (HasCallStack, NFData a, MonadIO m) => Maybe a -> m a expectJustDeep_ :: (HasCallStack, NFData a, MonadIO m) => Maybe a -> m () expectNothing :: (HasCallStack, Show a, MonadIO m) => Maybe a -> m () -- | Enforce the type of expectation -- -- Useful with polymorphic expectations that are defined below. -- --

Example

-- -- Because shouldBeExpr is polymorphic in m, compiler -- will choke with a unification error. This is due to the fact that -- hspec's it expects a polymorphic Example. -- --
--   it "MyTest" $ do
--     "foo" `shouldBeExpr` "bar"
--   
-- -- However, this is easily solved by io: -- --
--   it "MyTest" $ io $ do
--     "foo" `shouldBeExpr` "bar"
--   
io :: IO a -> IO a impSpecMain :: Spec -> IO () impSpecConfig :: Config impSpecMainWithConfig :: Config -> Spec -> IO () uniformListRM :: (HasStatefulGen g m, UniformRange a) => (a, a) -> Int -> m [a] uniformShortByteStringM :: HasStatefulGen a m => Int -> m ShortByteString ansiDocToString :: Doc AnsiStyle -> String prettyImpException :: ImpException -> Doc AnsiStyle applyQCGen :: (QCGen -> (b, QCGen)) -> ImpM t b evalImpM :: ImpSpec t => Maybe QCGen -> Maybe Int -> ImpInit t -> ImpM t b -> IO b getLogs :: ImpM t (Doc AnsiStyle) modifyLogs :: (Doc AnsiStyle -> Doc AnsiStyle) -> ImpM t () -- | Override the QuickCheck generator using a fixed seed. impSetSeed :: Int -> ImpM t () evalImpGenM :: ImpSpec t => ImpInit t -> ImpM t b -> Gen (IO b) runImpGenM :: ImpSpec t => ImpInit t -> ImpM t b -> Gen (IO (b, ImpState t)) runImpM :: ImpSpec t => Maybe QCGen -> Maybe Int -> ImpInit t -> ImpM t b -> IO (b, ImpState t) execImpGenM :: ImpSpec t => ImpInit t -> ImpM t b -> Gen (IO (ImpState t)) execImpM :: ImpSpec t => Maybe QCGen -> Maybe Int -> ImpInit t -> ImpM t b -> IO (ImpState t) runImpGenM_ :: ImpSpec t => ImpInit t -> ImpM t b -> Gen (IO ()) runImpM_ :: ImpSpec t => Maybe QCGen -> Maybe Int -> ImpInit t -> ImpM t b -> IO () withImpInit :: ImpSpec t => SpecWith (ImpInit t) -> Spec modifyImpInit :: (ImpInit t -> ImpInit t) -> SpecWith (ImpInit t) -> SpecWith (ImpInit t) -- | Annotation for when failure happens. All the logging done within -- annotation will be discarded if there no failures within the -- annotation. impAnn :: NFData a => String -> ImpM t a -> ImpM t a impAnnDoc :: NFData a => Doc AnsiStyle -> ImpM t a -> ImpM t a -- | Adds a source location and Doc to the log, which are only shown if the -- test fails logWithCallStack :: CallStack -> Doc AnsiStyle -> ImpM t () -- | Adds a Doc to the log, which is only shown if the test fails logDoc :: HasCallStack => Doc AnsiStyle -> ImpM t () -- | Adds a Text to the log, which is only shown if the test fails logText :: HasCallStack => Text -> ImpM t () -- | Adds a String to the log, which is only shown if the test fails logString :: HasCallStack => String -> ImpM t ()