答案 0 :(得分:3)
与GHC 8.4或更新版本捆绑的Haddock(Haddock版本> = 2.18.2)支持表格。根据{{3}},语法基于the pull request where this was added。
module Sample where
-- | A 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 |
-- +------------------------+------------+----------+----------+
-- | body row 2 | Cells may span columns. |
-- +------------------------+------------+---------------------+
-- | body row 3 | Cells may | \[ |
-- +------------------------+ span rows. | f(n) = \sum_{i=1} |
-- | body row 4 | | \] |
-- +------------------------+------------+---------------------+
sample :: ()
sample = ()
变成
答案 1 :(得分:1)
Haddock "markup"目前不支持表格,另请参阅Haddock User Guide - Chapter 3. Documentation and Markup。有一个open issue可以添加对简单表的支持。