Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
TestError data type, Internal
Synopsis
- data TestError where
- UnsafeTestError :: HasCallStack => Text -> TestError
- pattern TestError :: HasCallStack => HasCallStack => Text -> TestError
- testError :: forall a r. HasCallStack => Member (Error TestError) r => Text -> Sem r a
Documentation
An error that occurred in the test machinery.
The pattern synonym is used for construction to ensure that the call site's stack is stored.
There is no IsString
instance because it can't propagate the call stack.
Use testError
to throw a string literal.
UnsafeTestError :: HasCallStack => Text -> TestError |
pattern TestError :: HasCallStack => HasCallStack => Text -> TestError | Construct a test error so that the call site's stack is stored in the value, for printing the correct location in hedgehog messages. |