Text.XHtml.Table

Safe Haskell Safe
Language Haskell2010

Description

Table combinators for XHTML.

data HtmlTable Source

We internally represent the Cell inside a Table with an object of the type

	   Int -> Int -> Html

When we render it later, we find out how many columns or rows this cell will span over, and can include the correct colspan/rowspan command.

Instances
Instances details
Show HtmlTable
Instance details

Defined in Text.XHtml.Table

HTML HtmlTable
Instance details

Defined in Text.XHtml.Table

HTMLTABLE HtmlTable
Instance details

Defined in Text.XHtml.Table

Methods

cell :: HtmlTable -> HtmlTable Source

class HTMLTABLE ht where Source

Methods

cell :: ht -> HtmlTable Source

Instances
Instances details
HTMLTABLE Html
Instance details

Defined in Text.XHtml.Table

Methods

cell :: Html -> HtmlTable Source

HTMLTABLE HtmlTable
Instance details

Defined in Text.XHtml.Table

Methods

cell :: HtmlTable -> HtmlTable Source

(</>) :: (HTMLTABLE ht1, HTMLTABLE ht2) => ht1 -> ht2 -> HtmlTable infixr 3 Source

above :: (HTMLTABLE ht1, HTMLTABLE ht2) => ht1 -> ht2 -> HtmlTable Source

(<->) :: (HTMLTABLE ht1, HTMLTABLE ht2) => ht1 -> ht2 -> HtmlTable infixr 4 Source

beside :: (HTMLTABLE ht1, HTMLTABLE ht2) => ht1 -> ht2 -> HtmlTable Source

aboves :: HTMLTABLE ht => [ht] -> HtmlTable Source

besides :: HTMLTABLE ht => [ht] -> HtmlTable Source

simpleTable :: [HtmlAttr] -> [HtmlAttr] -> [[Html]] -> Html Source

If you can't be bothered with the above, then you can build simple tables with simpleTable. Just provide the attributes for the whole table, attributes for the cells (same for every cell), and a list of lists of cell contents, and this function will build the table for you. It does presume that all the lists are non-empty, and there is at least one list.

Different length lists means that the last cell gets padded. If you want more power, then use the system above, or build tables explicitly.

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/xhtml-3000.2.2.1/Text-XHtml-Table.html