assertBool :: HasCallStack=> StringThe message that is displayed if the assertion fails
-> BoolThe condition
-> Assertion
Asserts that the specified condition holds.
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12
ModuleImpSpec-0.2.0.0Haskell2010
assertBool :: HasCallStack=> StringThe message that is displayed if the assertion fails
-> BoolThe condition
-> AssertionAsserts that the specified condition holds.
assertFailure :: HasCallStack=> StringA message that is displayed with the assertion failure
-> IO aUnconditionally signals that a failure has occurred.
actual `shouldBe` expected sets the expectation that actual is equal
to expected.
v `shouldSatisfy` p sets the expectation that p v is True.
list `shouldStartWith` prefix sets the expectation that list starts with prefix,
list `shouldEndWith` suffix sets the expectation that list ends with suffix,
list `shouldContain` sublist sets the expectation that sublist is contained,
wholly and intact, anywhere in list.
xs `shouldMatchList` ys sets the expectation that xs has the same
elements that ys has, possibly in another order
action `shouldReturn` expected sets the expectation that action
returns expected.
actual `shouldNotBe` notExpected sets the expectation that actual is not
equal to notExpected
v `shouldNotSatisfy` p sets the expectation that p v is False.
list `shouldNotContain` sublist sets the expectation that sublist is not
contained anywhere in list.
action `shouldNotReturn` notExpected sets the expectation that action
does not return notExpected.
action `shouldThrow` selector sets the expectation that action throws
an exception. The precise nature of the expected exception is described
with a Selector.
A Selector is a predicate; it can simultaneously constrain the type and
value of an exception.
Similar to assertFailure, except hspec will not interfer with any escape sequences that indicate color output.
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.
Same as expectRight, but also evaluate the returned value to NF
Same as expectRightDeep, but discards the result
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.
Same as expectLeft, but also evaluate the returned value to NF
Same as expectLeftDeep, but discards the result
Return value from the Just an fail otherwise
Difference from shouldSatisfy action in that expectJust will force the
content of the Just to WHNF and it will also return it.isJust
Same as expectJust, but will force the value to NF
Same as expectJustDeep, but will discard the forced contents of Just
Same as shouldSatisfy action isNothing