pptable-0.2.0.0: Pretty Print containers in a tabular format

Safe HaskellNone
LanguageHaskell2010

Text.PrettyPrint.Tabulate

Description

Module implements the default methods for Tabulate

Synopsis

Documentation

class Data a => Tabulate a where Source #

The elements in a Traverserable should be an instance of Tabulate to be displayed in a tabular format

Methods

ppTable :: Boxable f => f a -> IO () Source #

Generic function that will be provided by the GTabulate class.

ppTable :: (Boxable f, Generic a, GTabulate (Rep a)) => f a -> IO () Source #

Generic function that will be provided by the GTabulate class.

class Boxable b where Source #

Class that can be derived by a Traversable to create a list of Box values and print as a Table. Default instances for List, Map and Vector are already provided.

Minimal complete definition

toBox, printTable

Methods

toBox :: (Data a, Generic a, GTabulate (Rep a)) => b a -> [[Box]] Source #

printTable :: (Data a, Generic a, GTabulate (Rep a)) => b a -> IO () Source #

Instances

Boxable [] Source # 

Methods

toBox :: (Data a, Generic a, GTabulate (Rep a)) => [a] -> [[Box]] Source #

printTable :: (Data a, Generic a, GTabulate (Rep a)) => [a] -> IO () Source #

Boxable Vector Source # 

Methods

toBox :: (Data a, Generic a, GTabulate (Rep a)) => Vector a -> [[Box]] Source #

printTable :: (Data a, Generic a, GTabulate (Rep a)) => Vector a -> IO () Source #

Show k => Boxable (Map k) Source # 

Methods

toBox :: (Data a, Generic a, GTabulate (Rep a)) => Map k a -> [[Box]] Source #

printTable :: (Data a, Generic a, GTabulate (Rep a)) => Map k a -> IO () Source #

class CellValueFormatter a Source #

Class that implements formatting using printf. Default instances for String, Char, Int, Integer, Double and Float are provided. For types that are not an instance of this class show is used.