table-layout-1.0.0.0: Format tabular data as grid or table.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Layout.Table.Spec.RowGroup

Synopsis

Documentation

data RowGroup a Source #

Groups rows together which should not be visually seperated from each other.

Constructors

SingletonRowGroup (Row a) 
MultiRowGroup [Row a] 
NullableRowGroup [Row (Maybe a)] 

rowsG :: [Row a] -> RowGroup a Source #

Group the given rows together.

rowG :: Row a -> RowGroup a Source #

Make a group of a single row.

nullableRowsG :: [Row (Maybe a)] -> RowGroup a Source #

Provide a RowGroup where single cells may be missing.

rowGroupShape :: RowGroup a -> [()] Source #

Extracts the shape of the RowGroup from the first row.

data ColumnSegment a Source #

Instances

Instances details
Foldable ColumnSegment Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

fold :: Monoid m => ColumnSegment m -> m

foldMap :: Monoid m => (a -> m) -> ColumnSegment a -> m

foldMap' :: Monoid m => (a -> m) -> ColumnSegment a -> m

foldr :: (a -> b -> b) -> b -> ColumnSegment a -> b

foldr' :: (a -> b -> b) -> b -> ColumnSegment a -> b

foldl :: (b -> a -> b) -> b -> ColumnSegment a -> b

foldl' :: (b -> a -> b) -> b -> ColumnSegment a -> b

foldr1 :: (a -> a -> a) -> ColumnSegment a -> a

foldl1 :: (a -> a -> a) -> ColumnSegment a -> a

toList :: ColumnSegment a -> [a]

null :: ColumnSegment a -> Bool

length :: ColumnSegment a -> Int

elem :: Eq a => a -> ColumnSegment a -> Bool

maximum :: Ord a => ColumnSegment a -> a

minimum :: Ord a => ColumnSegment a -> a

sum :: Num a => ColumnSegment a -> a

product :: Num a => ColumnSegment a -> a

Functor ColumnSegment Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

fmap :: (a -> b) -> ColumnSegment a -> ColumnSegment b

(<$) :: a -> ColumnSegment b -> ColumnSegment a

Show a => Show (ColumnSegment a) Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

showsPrec :: Int -> ColumnSegment a -> ShowS

show :: ColumnSegment a -> String

showList :: [ColumnSegment a] -> ShowS

Eq a => Eq (ColumnSegment a) Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

(==) :: ColumnSegment a -> ColumnSegment a -> Bool

(/=) :: ColumnSegment a -> ColumnSegment a -> Bool

newtype SegmentedColumn a Source #

Constructors

SegmentedColumn [ColumnSegment a] 

Instances

Instances details
Foldable SegmentedColumn Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

fold :: Monoid m => SegmentedColumn m -> m

foldMap :: Monoid m => (a -> m) -> SegmentedColumn a -> m

foldMap' :: Monoid m => (a -> m) -> SegmentedColumn a -> m

foldr :: (a -> b -> b) -> b -> SegmentedColumn a -> b

foldr' :: (a -> b -> b) -> b -> SegmentedColumn a -> b

foldl :: (b -> a -> b) -> b -> SegmentedColumn a -> b

foldl' :: (b -> a -> b) -> b -> SegmentedColumn a -> b

foldr1 :: (a -> a -> a) -> SegmentedColumn a -> a

foldl1 :: (a -> a -> a) -> SegmentedColumn a -> a

toList :: SegmentedColumn a -> [a]

null :: SegmentedColumn a -> Bool

length :: SegmentedColumn a -> Int

elem :: Eq a => a -> SegmentedColumn a -> Bool

maximum :: Ord a => SegmentedColumn a -> a

minimum :: Ord a => SegmentedColumn a -> a

sum :: Num a => SegmentedColumn a -> a

product :: Num a => SegmentedColumn a -> a

Functor SegmentedColumn Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

fmap :: (a -> b) -> SegmentedColumn a -> SegmentedColumn b

(<$) :: a -> SegmentedColumn b -> SegmentedColumn a

Show a => Show (SegmentedColumn a) Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

showsPrec :: Int -> SegmentedColumn a -> ShowS

show :: SegmentedColumn a -> String

showList :: [SegmentedColumn a] -> ShowS

Eq a => Eq (SegmentedColumn a) Source # 
Instance details

Defined in Text.Layout.Table.Spec.RowGroup

Methods

(==) :: SegmentedColumn a -> SegmentedColumn a -> Bool

(/=) :: SegmentedColumn a -> SegmentedColumn a -> Bool

transposeRowGroups :: Col (RowGroup a) -> [SegmentedColumn a] Source #

Break down several RowGroups, which conceptually form a column by themselves, into a list of columns.

mapRowGroupColumns :: [(b, a -> b)] -> RowGroup a -> [[b]] Source #

Map each column with the corresponding function and replace empty inputs with the given value.