HTF-0.12.2.0: The Haskell Test Framework

Safe HaskellSafe-Inferred
LanguageHaskell2010

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 where Source

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

Minimal complete definition

pretty

Methods

pretty :: a -> Doc Source

Pretty-print a single value.

prettyList :: [a] -> Doc Source

Pretty-print a list of things.

showPretty :: a -> String Source

Pretty-print a single value as a String.

Instances

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

Utility function for inserting a = between two Doc values.