aboutsummaryrefslogtreecommitdiff
path: root/html-test
diff options
context:
space:
mode:
Diffstat (limited to 'html-test')
-rw-r--r--html-test/ref/Table.html238
-rw-r--r--html-test/src/Table.hs47
2 files changed, 285 insertions, 0 deletions
diff --git a/html-test/ref/Table.html b/html-test/ref/Table.html
new file mode 100644
index 00000000..959f18b2
--- /dev/null
+++ b/html-test/ref/Table.html
@@ -0,0 +1,238 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
+ /><title
+ >Table</title
+ ><link href="#" rel="stylesheet" type="text/css" title="Ocean"
+ /><link rel="stylesheet" type="text/css" href="#"
+ /><script src="haddock-bundle.min.js" async="async" type="text/javascript"
+ ></script
+ ><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"
+ ></script
+ ></head
+ ><body
+ ><div id="package-header"
+ ><ul class="links" id="page-menu"
+ ><li
+ ><a href="#"
+ >Contents</a
+ ></li
+ ><li
+ ><a href="#"
+ >Index</a
+ ></li
+ ></ul
+ ><p class="caption empty"
+ ></p
+ ></div
+ ><div id="content"
+ ><div id="module-header"
+ ><table class="info"
+ ><tr
+ ><th
+ >Safe Haskell</th
+ ><td
+ >Safe</td
+ ></tr
+ ></table
+ ><p class="caption"
+ >Table</p
+ ></div
+ ><div id="description"
+ ><p class="caption"
+ >Description</p
+ ><div class="doc"
+ ><p
+ >This tests the table markup</p
+ ></div
+ ></div
+ ><div id="synopsis"
+ ><details id="syn"
+ ><summary
+ >Synopsis</summary
+ ><ul class="details-toggle" data-details-id="syn"
+ ><li class="src short"
+ ><a href="#"
+ >tableWithHeader</a
+ > :: a -&gt; a</li
+ ><li class="src short"
+ ><a href="#"
+ >tableWithoutHeader</a
+ > :: a -&gt; a</li
+ ><li class="src short"
+ ><a href="#"
+ >fancyTable</a
+ > :: a -&gt; a</li
+ ></ul
+ ></details
+ ></div
+ ><div id="interface"
+ ><h1
+ >Documentation</h1
+ ><div class="top"
+ ><p class="src"
+ ><a id="v:tableWithHeader" class="def"
+ >tableWithHeader</a
+ > :: a -&gt; a <a href="#" class="selflink"
+ >#</a
+ ></p
+ ><div class="doc"
+ ><p
+ >Table with header.</p
+ ><table
+ ><thead
+ ><tr
+ ><th
+ > code </th
+ ><th
+ > message </th
+ ><th
+ > description </th
+ ></tr
+ ></thead
+ ><tbody
+ ><tr
+ ><td
+ > 200 </td
+ ><td
+ > <code
+ >OK</code
+ > </td
+ ><td
+ > operation successful </td
+ ></tr
+ ><tr
+ ><td
+ > 204 </td
+ ><td
+ > <code
+ >No Content</code
+ > </td
+ ><td
+ > operation successful, no body returned </td
+ ></tr
+ ></tbody
+ ></table
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><a id="v:tableWithoutHeader" class="def"
+ >tableWithoutHeader</a
+ > :: a -&gt; a <a href="#" class="selflink"
+ >#</a
+ ></p
+ ><div class="doc"
+ ><p
+ >Table without header.</p
+ ><table
+ ><tbody
+ ><tr
+ ><td
+ > 200 </td
+ ><td
+ > <code
+ >OK</code
+ > </td
+ ><td
+ > operation successful </td
+ ></tr
+ ><tr
+ ><td
+ > 204 </td
+ ><td
+ > <code
+ >No Content</code
+ > </td
+ ><td
+ > operation successful, no body returned </td
+ ></tr
+ ><tr
+ ><td
+ > 404 </td
+ ><td
+ > <code
+ >Not Found</code
+ > </td
+ ><td
+ > resource not found </td
+ ></tr
+ ></tbody
+ ></table
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><a id="v:fancyTable" class="def"
+ >fancyTable</a
+ > :: a -&gt; a <a href="#" class="selflink"
+ >#</a
+ ></p
+ ><div class="doc"
+ ><p
+ >Fancy table.</p
+ ><table
+ ><thead
+ ><tr
+ ><th
+ > Header row, column 1
+ (header rows optional) </th
+ ><th
+ > Header 2
+ </th
+ ><th
+ > Header 3
+ </th
+ ><th
+ > Header 4
+ </th
+ ></tr
+ ></thead
+ ><tbody
+ ><tr
+ ><td
+ > body row 1, column 1 </td
+ ><td
+ > column 2 </td
+ ><td
+ > column 3 </td
+ ><td
+ > column 4 </td
+ ></tr
+ ><tr
+ ><td
+ > <code
+ ><a href="#"
+ >tableWithHeader</a
+ ></code
+ > </td
+ ><td colspan="3"
+ > Cells may span columns. </td
+ ></tr
+ ><tr
+ ><td
+ > body row 3 </td
+ ><td rowspan="2"
+ > Cells may
+ span rows.
+ </td
+ ><td colspan="2" rowspan="2"
+ > \[
+ f(n) = \sum_{i=1}
+ \] </td
+ ></tr
+ ><tr
+ ><td
+ > body row 4 </td
+ ></tr
+ ></tbody
+ ></table
+ ></div
+ ></div
+ ></div
+ ></div
+ ><div id="footer"
+ ></div
+ ></body
+ ></html
+> \ No newline at end of file
diff --git a/html-test/src/Table.hs b/html-test/src/Table.hs
new file mode 100644
index 00000000..2cf0c662
--- /dev/null
+++ b/html-test/src/Table.hs
@@ -0,0 +1,47 @@
+-- | This tests the table markup
+module Table
+ ( tableWithHeader
+ , tableWithoutHeader
+ , fancyTable
+ ) where
+
+-- | Table with header.
+--
+-- +------+--------------+------------------------------------------+
+-- | code | message | description |
+-- +======+==============+==========================================+
+-- | 200 | @OK@ | operation successful |
+-- +------+--------------+------------------------------------------+
+-- | 204 | @No Content@ | operation successful, no body returned |
+-- +------+--------------+------------------------------------------+
+tableWithHeader :: a -> a
+tableWithHeader a = a
+
+-- | Table without header.
+--
+-- +------+--------------+------------------------------------------+
+-- | 200 | @OK@ | operation successful |
+-- +------+--------------+------------------------------------------+
+-- | 204 | @No Content@ | operation successful, no body returned |
+-- +------+--------------+------------------------------------------+
+-- | 404 | @Not Found@ | resource not found |
+-- +------+--------------+------------------------------------------+
+tableWithoutHeader :: a -> a
+tableWithoutHeader a = a
+
+-- | Fancy table.
+--
+-- +------------------------+------------+----------+----------+
+-- | Header row, column 1 | Header 2 | Header 3 | Header 4 |
+-- | (header rows optional) | | | |
+-- +========================+============+==========+==========+
+-- | body row 1, column 1 | column 2 | column 3 | column 4 |
+-- +------------------------+------------+----------+----------+
+-- | 'tableWithHeader' | Cells may span columns. |
+-- +------------------------+------------+---------------------+
+-- | body row 3 | Cells may | \[ |
+-- +------------------------+ span rows. | f(n) = \sum_{i=1} |
+-- | body row 4 | | \] |
+-- +------------------------+------------+---------------------+
+fancyTable :: a -> a
+fancyTable x = x