-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Pretty Print containers in a tabular format
--
-- Please see README.md
@package pptable
@version 0.2.0.0
-- | Module implements the default methods for Tabulate
module Text.PrettyPrint.Tabulate
-- | The elements in a Traverserable should be an instance of Tabulate to
-- be displayed in a tabular format
class (Data a) => Tabulate a where ppTable x = printTable x
-- | Generic function that will be provided by the GTabulate class.
ppTable :: (Tabulate a, Boxable f) => f a -> IO ()
-- | Generic function that will be provided by the GTabulate class.
ppTable :: (Tabulate a, Boxable f, Generic a, GTabulate (Rep a)) => f a -> IO ()
-- | 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.
class Boxable b
toBox :: (Boxable b, Data a, Generic a, GTabulate (Rep a)) => b a -> [[Box]]
printTable :: (Boxable b, Data a, Generic a, GTabulate (Rep a)) => b a -> IO ()
-- | 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.
class CellValueFormatter a where ppFormatter x = show x ppFormatterWithStyle _ x = "default_" ++ show x
instance Text.PrettyPrint.Tabulate.GTabulate GHC.Generics.U1
instance (Text.PrettyPrint.Tabulate.GTabulate a, Text.PrettyPrint.Tabulate.GTabulate b) => Text.PrettyPrint.Tabulate.GTabulate (a GHC.Generics.:*: b)
instance (Text.PrettyPrint.Tabulate.GTabulate a, Text.PrettyPrint.Tabulate.GTabulate b) => Text.PrettyPrint.Tabulate.GTabulate (a GHC.Generics.:+: b)
instance Text.PrettyPrint.Tabulate.GTabulate a => Text.PrettyPrint.Tabulate.GTabulate (GHC.Generics.M1 i c a)
instance Text.PrettyPrint.Tabulate.CellValueFormatter a => Text.PrettyPrint.Tabulate.GTabulate (GHC.Generics.K1 i a)
instance Text.PrettyPrint.Tabulate.CellValueFormatter GHC.Integer.Type.Integer
instance Text.PrettyPrint.Tabulate.CellValueFormatter GHC.Types.Int
instance Text.PrettyPrint.Tabulate.CellValueFormatter GHC.Types.Float
instance Text.PrettyPrint.Tabulate.CellValueFormatter GHC.Base.String
instance Text.PrettyPrint.Tabulate.CellValueFormatter GHC.Types.Double
instance Text.PrettyPrint.Tabulate.CellValueFormatter GHC.Types.Bool
instance Text.PrettyPrint.Tabulate.Boxable []
instance Text.PrettyPrint.Tabulate.Boxable Data.Vector.Vector
instance GHC.Show.Show k => Text.PrettyPrint.Tabulate.Boxable (Data.Map.Base.Map k)
-- | Example usage of ppTable library
module Text.PrettyPrint.Tabulate.Example