HTF-0.11.4.0: The Haskell Test Framework

Safe HaskellSafe-Inferred

Test.Framework.Pretty

Description

This module defines the Pretty type class. The assert functions from HUnitWrapper use the pretty-printing functionality provided by this type class so as to provide nicely formatted error messages.

Additionally, this module re-exports the standard Haskell pretty-printing module PrettyPrint

Synopsis

Documentation

class Pretty a whereSource

A type class for pretty-printable things. Minimal complete definition: pretty.

Methods

pretty :: a -> DocSource

Pretty-print a single value.

prettyList :: [a] -> DocSource

Pretty-print a list of things.

showPretty :: a -> StringSource

Pretty-print a single value as a String.

Instances

(<=>) :: Doc -> Doc -> DocSource

Utility function for inserting a = between two Doc values.