HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulesandwich-0.3.1.0Haskell2010

Test.Sandwich.Nodes

This module exports the special "primed" versions of the test tree nodes. These primed versions accept an additional options argument, which allows you to do things like control the visibility thresholds of the nodes.

Contents
  1. Basic nodes
  2. Node options
  3. Context manager nodes
Synopsis
  • Packagesandwich-0.3.1.0
  • Exports16
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceNodes.hs

Basic nodes

Node options

Context manager nodes

valueintroduce'
  1. :: (HasCallStack, Typeable intro)
  2. => NodeOptions

    Custom options for this node

  3. -> String

    String label for this node

  4. -> Label l intro

    Label under which to introduce the value

  5. -> ExampleT context m intro

    Action to produce the new value (of type intro)

  6. -> (HasCallStack => intro -> ExampleT context m ())

    Action to clean up the new value

  7. -> SpecFree (LabelValue l intro :> context) m ()

    Child spec tree

  8. -> SpecFree context m ()

Introduce a new value and make it available to the child spec tree.

valueintroduceWith'
  1. :: HasCallStack
  2. => NodeOptions

    Custom options for this node

  3. -> String

    String label for this node

  4. -> Label l intro

    Label under which to introduce the value

  5. -> ((HasCallStack => intro -> ExampleT context m [Result]) -> ExampleT context m ())

    Callback to receive the new value and the child tree.

  6. -> SpecFree (LabelValue l intro :> context) m ()

    Child spec tree

  7. -> SpecFree context m ()

Introduce a new value in an around fashion, so it can be used with context managers like withFile or bracket.