HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulexhtml-3000.2.2.1Haskell2010

Text.XHtml.Table

Table combinators for XHTML.

  • 1 type
  • 1 class
  • 7 values
  • Packagexhtml-3000.2.2.1
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTable.hs
newtypenewtype HtmlTable
#

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.

Instances3Show, HTML, HTMLTABLE
valuesimpleTable :: [HtmlAttr] -> [HtmlAttr] -> [[Html]] -> Html
#

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.