aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/fixtures/examples/table1.parsed
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2017-12-26 17:13:14 +0200
committerAlexander Biehl <alexbiehl@gmail.com>2018-02-01 14:58:18 +0100
commit088b1993fb6c6ed014a95e93d7c07f68218c7777 (patch)
tree47d7c1c85657bf7670ff154ad9a9bc1d1538b0d0 /haddock-library/fixtures/examples/table1.parsed
parent2e0d7aef60fbb17f29ffa1f363ffc423f31185fc (diff)
Grid Tables (#718)
* Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example
Diffstat (limited to 'haddock-library/fixtures/examples/table1.parsed')
-rw-r--r--haddock-library/fixtures/examples/table1.parsed81
1 files changed, 81 insertions, 0 deletions
diff --git a/haddock-library/fixtures/examples/table1.parsed b/haddock-library/fixtures/examples/table1.parsed
new file mode 100644
index 00000000..2fa58fd8
--- /dev/null
+++ b/haddock-library/fixtures/examples/table1.parsed
@@ -0,0 +1,81 @@
+DocTable
+ Table
+ {tableBodyRows = [TableRow
+ [TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString " body row 1, column 1 ",
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString " column 2 ",
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString " column 3 ",
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString " column 4 ",
+ tableCellRowspan = 1}],
+ TableRow
+ [TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString " body row 2 ",
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 3,
+ tableCellContents = DocString " Cells may span columns. ",
+ tableCellRowspan = 1}],
+ TableRow
+ [TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString " body row 3 ",
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString
+ (concat
+ [" Cells may \n",
+ " span rows. \n",
+ " "]),
+ tableCellRowspan = 2},
+ TableCell
+ {tableCellColspan = 2,
+ tableCellContents = DocAppend
+ (DocString " ")
+ (DocAppend
+ (DocMathDisplay
+ (concat
+ [" \n",
+ " f(n) = \\sum_{i=1} \n",
+ " "]))
+ (DocString " ")),
+ tableCellRowspan = 2}],
+ TableRow
+ [TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString " body row 4 ",
+ tableCellRowspan = 1}]],
+ tableHeaderRows = [TableRow
+ [TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString
+ (concat
+ [" Header row, column 1 \n",
+ " (header rows optional) "]),
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString
+ (concat [" Header 2 \n", " "]),
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString
+ (concat [" Header 3 \n", " "]),
+ tableCellRowspan = 1},
+ TableCell
+ {tableCellColspan = 1,
+ tableCellContents = DocString
+ (concat [" Header 4 \n", " "]),
+ tableCellRowspan = 1}]]}