pluralize count singular pluralizes the given singular word unless given
count is 1.
Examples:
pluralize 0 "example""0 examples"
pluralize 1 "example""1 example"
pluralize 2 "example""2 examples"
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulehspec-core-2.11.14Haskell2010
pluralize count singular pluralizes the given singular word unless given
count is 1.
Examples:
pluralize 0 "example""0 examples"
pluralize 1 "example""1 example"
pluralize 2 "example""2 examples"
Strip leading and trailing whitespace
Ensure that lines are not longer than given n, insert line breaks at word
boundaries
Remove ANSI color escape sequences.
A Path describes the location of a spec item within a spec tree.
It consists of a list of group descriptions and a requirement description.
Join a Path with slashes. The result will have a leading and a trailing slash.
Try to create a proper English sentence from a path by applying some heuristics.
A predicate that can be used to filter a spec tree.
safeTry evaluates given action and returns its result. If an exception
occurs, the exception is returned instead. Unlike try it is agnostic to
asynchronous exceptions.
The function formatException converts an exception to a string.
This is different from show. The type of the exception is included, e.g.:
formatException (toException DivideByZero)"ArithException\ndivide by zero"
For IOExceptions the IOErrorType is included, as well.