Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Text.Layout.Table.Spec.HeaderSpec
Synopsis
- data HeaderSpec sep a
- = GroupHS sep [HeaderSpec sep a]
- | HeaderHS HeaderColSpec a
- | NoneHS sep
- defHeaderSpec :: Default sep => HeaderSpec sep a
- noneSepH :: sep -> HeaderSpec sep String
- noneH :: Default sep => HeaderSpec sep String
- fullSepH :: sep -> [HeaderColSpec] -> [a] -> HeaderSpec sep a
- fullH :: Default sep => [HeaderColSpec] -> [a] -> HeaderSpec sep a
- titlesH :: Default sep => [a] -> HeaderSpec sep a
- groupH :: sep -> [HeaderSpec sep a] -> HeaderSpec sep a
- headerH :: HeaderColSpec -> a -> HeaderSpec sep a
- zipHeader :: b -> [b] -> HeaderSpec sep a -> HeaderSpec sep (b, a)
- flattenHeader :: HeaderSpec sep a -> [Either sep a]
- headerContents :: HeaderSpec sep a -> [(HeaderColSpec, a)]
Documentation
data HeaderSpec sep a Source #
Specifies a header.
Constructors
GroupHS sep [HeaderSpec sep a] | A grouping of subheaders separated by delimiters with the given label |
HeaderHS HeaderColSpec a | A single header column with a given |
NoneHS sep | Do not display the header, and determine the shape as a flat list sized to the table content with a given separator. |
Instances
Bifunctor HeaderSpec Source # | |
Defined in Text.Layout.Table.Spec.HeaderSpec Methods bimap :: (a -> b) -> (c -> d) -> HeaderSpec a c -> HeaderSpec b d # first :: (a -> b) -> HeaderSpec a c -> HeaderSpec b c # second :: (b -> c) -> HeaderSpec a b -> HeaderSpec a c # | |
Foldable (HeaderSpec sep) Source # | |
Defined in Text.Layout.Table.Spec.HeaderSpec Methods fold :: Monoid m => HeaderSpec sep m -> m # foldMap :: Monoid m => (a -> m) -> HeaderSpec sep a -> m # foldMap' :: Monoid m => (a -> m) -> HeaderSpec sep a -> m # foldr :: (a -> b -> b) -> b -> HeaderSpec sep a -> b # foldr' :: (a -> b -> b) -> b -> HeaderSpec sep a -> b # foldl :: (b -> a -> b) -> b -> HeaderSpec sep a -> b # foldl' :: (b -> a -> b) -> b -> HeaderSpec sep a -> b # foldr1 :: (a -> a -> a) -> HeaderSpec sep a -> a # foldl1 :: (a -> a -> a) -> HeaderSpec sep a -> a # toList :: HeaderSpec sep a -> [a] # null :: HeaderSpec sep a -> Bool # length :: HeaderSpec sep a -> Int # elem :: Eq a => a -> HeaderSpec sep a -> Bool # maximum :: Ord a => HeaderSpec sep a -> a # minimum :: Ord a => HeaderSpec sep a -> a # sum :: Num a => HeaderSpec sep a -> a # product :: Num a => HeaderSpec sep a -> a # | |
Traversable (HeaderSpec sep) Source # | |
Defined in Text.Layout.Table.Spec.HeaderSpec Methods traverse :: Applicative f => (a -> f b) -> HeaderSpec sep a -> f (HeaderSpec sep b) # sequenceA :: Applicative f => HeaderSpec sep (f a) -> f (HeaderSpec sep a) # mapM :: Monad m => (a -> m b) -> HeaderSpec sep a -> m (HeaderSpec sep b) # sequence :: Monad m => HeaderSpec sep (m a) -> m (HeaderSpec sep a) # | |
Functor (HeaderSpec sep) Source # | |
Defined in Text.Layout.Table.Spec.HeaderSpec Methods fmap :: (a -> b) -> HeaderSpec sep a -> HeaderSpec sep b # (<$) :: a -> HeaderSpec sep b -> HeaderSpec sep a # | |
Default sep => Default (HeaderSpec sep a) Source # | By the default the header is not shown. |
Defined in Text.Layout.Table.Spec.HeaderSpec Methods def :: HeaderSpec sep a # |
defHeaderSpec :: Default sep => HeaderSpec sep a Source #
The default HeaderSpec
does not display the header and uses the default
separator.
noneSepH :: sep -> HeaderSpec sep String Source #
Specify no header, with columns separated by a given separator.
noneH :: Default sep => HeaderSpec sep String Source #
Specify no header, with columns separated by a default separator.
fullSepH :: sep -> [HeaderColSpec] -> [a] -> HeaderSpec sep a Source #
Specify every header column in detail and separate them by the given separator.
fullH :: Default sep => [HeaderColSpec] -> [a] -> HeaderSpec sep a Source #
Specify every header column in detail and separate them with the default separator.
titlesH :: Default sep => [a] -> HeaderSpec sep a Source #
Use titles with the default header column specification and separator.
groupH :: sep -> [HeaderSpec sep a] -> HeaderSpec sep a Source #
Combine the header specification for multiple columns by separating the columns with a specific separator.
headerH :: HeaderColSpec -> a -> HeaderSpec sep a Source #
Specify the header for a single column.
zipHeader :: b -> [b] -> HeaderSpec sep a -> HeaderSpec sep (b, a) Source #
Zip a HeaderSpec
with a list.
flattenHeader :: HeaderSpec sep a -> [Either sep a] Source #
Flatten a header to produce a list of content and separators.
headerContents :: HeaderSpec sep a -> [(HeaderColSpec, a)] Source #
Get the titles and column specifications from a header.