-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple table generator -- -- Pass a 2D-list of strings and get a single string with table contents. @package SimpleTableGenerator @version 0.2.0.0 -- | This library is for drawing text tables. -- -- Pass a 2D-list of strings and get a single string with table contents. -- --
--   makeDefaultSimpleTable :: [[String]] -> String
--   
module Text.SimpleTableGenerator -- | Example usage: -- --
--   putStrLn $ makeSimpleTable simpleTableConfig {
--     tableBorders = "+++++++++-|",
--     colMinWidths  = [3, 4],
--     rowMinHeights = [2],
--     padFunction   = simpleTableLeftPad,
--     cellPadFunction = simpleTableBottomPad,
--     horizontalPadding = 0,
--     verticalPadding = 1,
--     paddingStr = ".,`"
--   } [["a"], ["b", "c"]]
--   
makeSimpleTable :: SimpleTableConfig -> [[String]] -> String -- | Create table using simpleTableConfig. Example usage: -- --
--   putStrLn $ makeDefaultSimpleTable [["1","2","3"], ["One","Two","Three"], ["First", "Second"]]
--   
makeDefaultSimpleTable :: [[String]] -> String -- | Data type that represents table configuration. data SimpleTableConfig SimpleTableConfig :: String -> [Int] -> [Int] -> (String -> Int -> String -> String) -> (String -> Int -> [String] -> [String]) -> Int -> Int -> String -> String -> SimpleTableConfig -- | String containing table border characters, in order like this: -- "┌┬┐├┼┤└┴┘─│". Must be exactly 11 characters long, otherwise error -- will be thrown. [tableBorders] :: SimpleTableConfig -> String -- | Minimum widths for each column, from left to right. Padding size is -- not counted. List's length may not match the actual count of columns -- in a table. [colMinWidths] :: SimpleTableConfig -> [Int] -- | Minimum heights for each row, from top to bottom. Padding size is not -- counted. List's length may not match the actual count of rows in a -- table. [rowMinHeights] :: SimpleTableConfig -> [Int] [padFunction] :: SimpleTableConfig -> String -> Int -> String -> String [cellPadFunction] :: SimpleTableConfig -> String -> Int -> [String] -> [String] -- | Width of left and right margins. [horizontalPadding] :: SimpleTableConfig -> Int -- | Height of top and bottom margins. [verticalPadding] :: SimpleTableConfig -> Int -- | String used as padding. " " (space) by default. [paddingStr] :: SimpleTableConfig -> String -- | String used to fill in empty cells. "" by default. Empty cells will be -- padded with paddingStr after placing emptyCellStr into -- each them. [emptyCellStr] :: SimpleTableConfig -> String -- | Default table config. simpleTableConfig :: SimpleTableConfig -- | Horizontal padding function. Appends padding string (first argument) -- to the left of the given string to make it's length equal to the -- second argument. simpleTableLeftPad :: String -> Int -> String -> String -- | Horizontal padding function. Appends padding string (first argument) -- both to the right and left of the given string to make it's length -- equal to the second argument. simpleTableCenterPad :: String -> Int -> String -> String -- | Horizontal padding function. Appends padding string (first argument) -- to the right of the given string to make it's length equal to the -- second argument. simpleTableRightPad :: String -> Int -> String -> String -- | Vertical padding function. Appends padding to the bottom of given -- Cell simpleTableBottomPad :: String -> Int -> Cell -> [String] -- | Vertical padding function. Appends padding both to top and bottom of -- given Cell simpleTableMiddlePad :: String -> Int -> Cell -> [String] -- | Vertical padding function. Appends padding to the top of given -- Cell simpleTableTopPad :: String -> Int -> Cell -> [String] instance GHC.Show.Show Text.SimpleTableGenerator.CellWrapper