| Safe Haskell | Safe | 
|---|---|
| Language | Haskell2010 | 
Text.Layout.Table.Primitives.ColumnModifier
Synopsis
- data ColModInfo
 - showCMI :: ColModInfo -> String
 - widthCMI :: ColModInfo -> Int
 - unalignedCMI :: ColModInfo -> ColModInfo
 - ensureWidthCMI :: Int -> Position H -> ColModInfo -> ColModInfo
 - ensureWidthOfCMI :: String -> Position H -> ColModInfo -> ColModInfo
 - fitTitlesCMI :: [String] -> [Position H] -> [ColModInfo] -> [ColModInfo]
 - columnModifier :: (Cell a, StringBuilder b) => Position H -> CutMark -> ColModInfo -> a -> b
 - deriveColModInfos :: Cell a => [(LenSpec, AlignSpec)] -> [Row a] -> [ColModInfo]
 - deriveColModInfos' :: Cell a => [ColSpec] -> [Row a] -> [ColModInfo]
 - deriveColMods :: (Cell a, StringBuilder b) => [ColSpec] -> [Row a] -> [a -> b]
 - deriveAlignInfo :: Cell a => OccSpec -> a -> AlignInfo
 
Documentation
data ColModInfo Source #
Specifies how a column should be modified. Values of this type are derived
 in a traversal over the input columns by using deriveColModInfos. Finally,
 columnModifier will interpret them and apply the appropriate modification
 function to the cells of the column.
showCMI :: ColModInfo -> String Source #
Private show function.
widthCMI :: ColModInfo -> Int Source #
Get the exact width of a ColModInfo after applying it with
 columnModifier.
unalignedCMI :: ColModInfo -> ColModInfo Source #
Remove alignment from a ColModInfo. This is used to change alignment of
 headers while using the combined width information.
ensureWidthCMI :: Int -> Position H -> ColModInfo -> ColModInfo Source #
Ensures that the modification provides a minimum width but only if it is not limited.
ensureWidthOfCMI :: String -> Position H -> ColModInfo -> ColModInfo Source #
Ensures that the given String will fit into the modified columns.
fitTitlesCMI :: [String] -> [Position H] -> [ColModInfo] -> [ColModInfo] Source #
Fit titles of a header column into the derived ColModInfo.
columnModifier :: (Cell a, StringBuilder b) => Position H -> CutMark -> ColModInfo -> a -> b Source #
Generates a function which modifies a given cell according to
 Position, CutMark and ColModInfo. This is
 used to modify a single cell of a column to bring all cells of a column to
 the same width.
deriveColModInfos :: Cell a => [(LenSpec, AlignSpec)] -> [Row a] -> [ColModInfo] Source #
Derive the ColModInfo by using layout specifications and the actual cells
 of a column. This function only needs to know about LenSpec and AlignInfo.
deriveColModInfos' :: Cell a => [ColSpec] -> [Row a] -> [ColModInfo] Source #
deriveColMods :: (Cell a, StringBuilder b) => [ColSpec] -> [Row a] -> [a -> b] Source #
Derive the ColModInfo and generate functions without any intermediate
 steps.