HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulehspec-expectations-0.8.4Haskell2010

Test.Hspec.Expectations

  • 3 types
  • 18 values

Setting expectations

13 declarations

Expecting exceptions

1 declaration

Selecting exceptions

typetype Selector a = a -> Bool
#

A Selector is a predicate; it can simultaneously constrain the type and value of an exception.

Predefined type-based selectors

There are predefined selectors for some standard exceptions. Each selector is just const True with an appropriate type.

Combinators for defining value-based selectors

Some exceptions (most prominently ErrorCall) have no Eq instance. Selecting a specific value would require pattern matching.

For such exceptions, combinators that construct selectors are provided. Each combinator corresponds to a constructor; it takes the same arguments, and has the same name (but starting with a lower-case letter).

Re-exports

1 declaration
typetype HasCallStack = IP "callStack" CallStack
#

Request a CallStack.

NOTE: The implicit parameter ?callStack :: CallStack is an implementation detail and should not be considered part of the CallStack API, we may decide to change the implementation in the future.