#Entry Source

type Entry :: (Type -> Type) -> Type -> Typetype Entry b v = { bracket :: Maybe (Bracket b), label :: String, value :: v }

Generic entry type used in the description of groups and items in both Description and Plan representations.

#entry Source

entry :: forall b v. String -> v -> Entry b v

Creates an entry with the specifed label and no bracket action.

#Bracket Source

newtype Bracket :: (Type -> Type) -> Typenewtype Bracket b

A data type used to carry bracketing for an entry. The r type is existentially hidden so that the resources created and freed within an entry can vary between items in a suite or plan.


  • Bracket (forall x. (forall r. b r -> (r -> b Unit) -> x) -> x)

#bracket Source

bracket :: forall b r. b r -> (r -> b Unit) -> Bracket b

Creates a bracket value for the Entry record. The first argument runs before the group/item, possibly generating some kind of resource r. The second argument runs on test completion, accepting the r generated in allocation to allow it to de-allocate/clean up.

#unBracket Source

unBracket :: forall b o. (forall r. b r -> (r -> b Unit) -> o) -> Bracket b -> o

Unwraps an existentially hidden Bracket value.