aboutsummaryrefslogtreecommitdiff
path: root/html-test/src/Table.hs
blob: 4ffbc9b350d5feef38f8da4b6437e0cc039a10b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{-# LANGUAGE Haskell2010 #-}
-- | 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