HORIZON HASKELLDocslts/ghc-9.14.x99ffbb82026-10-19Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 99ffbb8 · 2026-10-19

Modulehedgehog-extras-0.10.1.0Haskell2010

Hedgehog.Extras.Test.Tripwire

This modules provides a tripwire abstraction. You can use tripwire as a detection mechanism if the code path was executed. Trip a tripwire with trip in the place where you'd like to detect if it was reached. The tripwire can then be checked in the other place in the code using for example isTripped or assertNotTripped.

Contents
  1. Create a tripwire
  2. Tripwire operations
  3. Assertions
Synopsis

Create a tripwire

datadata Tripwire

Represents a tripwire which can be tripped only once. It can be used to detect if a particular code path was reached.

Instances1Show
  • Show TripwireDefined in hedgehog-extras-0.10.1.0 · Hedgehog.Extras.Test.Tripwire

Tripwire operations

valuetrip_ :: (HasCallStack, MonadIO m) => Tripwire -> m ()

Triggers the tripwire and registers the place of the first trigger. Idempotent. A silent variant of trip which does not require MonadTest, but also does not log the information about tripping.

Assertions