HTF-0.13.1.0: The Haskell Test Framework

Safe HaskellSafe
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 #

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

Minimal complete definition

pretty

Methods

pretty :: a -> Doc #

Pretty-print a single value.

prettyList :: [a] -> Doc #

Pretty-print a list of things.

showPretty :: a -> String #

Pretty-print a single value as a String.

Instances

Pretty Bool # 

Methods

pretty :: Bool -> Doc #

prettyList :: [Bool] -> Doc #

showPretty :: Bool -> String #

Pretty Char # 

Methods

pretty :: Char -> Doc #

prettyList :: [Char] -> Doc #

showPretty :: Char -> String #

Pretty Int # 

Methods

pretty :: Int -> Doc #

prettyList :: [Int] -> Doc #

showPretty :: Int -> String #

Pretty a => Pretty [a] # 

Methods

pretty :: [a] -> Doc #

prettyList :: [[a]] -> Doc #

showPretty :: [a] -> String #

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

Utility function for inserting a = between two Doc values.