# Haddock Authors - Documentation and Markup (Highlights)

## Metadata
**Review**:: [readwise.io](https://readwise.io/bookreview/58005891)
**Source**:: #from/readwise #from/reader
**Zettel**:: #zettel/fleeting
**Status**:: #x
**Authors**:: [[Haddock Authors]]
**Full Title**:: Documentation and Markup
**Category**:: #articles #readwise/articles
**Category Icon**:: 📰
**URL**:: [haskell-haddock.readthedocs.io](https://haskell-haddock.readthedocs.io/latest/markup.html)
**Host**:: [[haskell-haddock.readthedocs.io]]
**Highlighted**:: [[2026-02-02]]
**Created**:: [[2026-02-07]]
## Highlights
- We can document top-level declarations, such as `square`, by **adding** a `-- |` comment **before** the declaration or a `-- ^` comment **after** the declaration (each shown as a diff). ([View Highlight](https://read.readwise.io/read/01kgdt7rf4ewx5s3xhfvjvgsk4)) ^983986608
- C1 -- ^ This is the documentation for the 'C1' constructor ([View Highlight](https://read.readwise.io/read/01kgdv21grfpa50qn538gjcfts)) ^983987874
- a -- ^ This is the documentation for the argument of type 'a' ([View Highlight](https://read.readwise.io/read/01kgdv25tsderanxbbvsfdxja7)) ^983987877
- deriving ( Eq -- ^ @since 4.5 ([View Highlight](https://read.readwise.io/read/01kgdv38gb7baas2tqm65rqhnf)) ^983987906
- Individual arguments to a function may be documented ([View Highlight](https://read.readwise.io/read/01kgdv40bzrj2300hm38th7c12)) ^983988018
- As instances are not exported, their documentation appears as part of the documentation for the corresponding class and the data types that appear in the instance head. This may result in the documentation appearing in multiple modules. ([View Highlight](https://read.readwise.io/read/01kgdv55dbd96427brbtmb6rme)) ^983988036
- Headings are introduced with the syntax `-- *`, `-- **` and so on, where the number of `*`s indicates the level of the heading (section, sub-section, sub-sub-section, etc.). ([View Highlight](https://read.readwise.io/read/01kgdv8zsp1dx1kzkadbfrw2vv)) ^983988488
- Haskell allows you to re-export the entire contents of a module (or at least, everything currently in scope that was imported from a given module) by listing it in the export list ([View Highlight](https://read.readwise.io/read/01kgdvam11321yamfpwwzgybn0)) ^983988556
- The documentation chunk is given a name of your choice (here `doc`), which is the sequence of alphanumeric characters directly after the `--
, and it may be referred to by the same name in the export list. Note that named chunks must come *after* any imports in the module body. ([View Highlight](https://read.readwise.io/read/01kgdvcmpastfmpmhbb1e0h7g9)) ^983988605
- Displayed blocks of code are indicated by surrounding a paragraph with `@...@` or by preceding each line of a paragraph with `>` (we often call these “bird tracks”). ([View Highlight](https://read.readwise.io/read/01kgdvgkb52er1n1pw8307t8v5)) ^983989829
- -- prop> a + b = b + a ([View Highlight](https://read.readwise.io/read/01kgdvhe8zfaaj1vcyx6gwksg0)) ^983989842
- Referring to a Haskell identifier, whether it be a type, class, constructor, or function, is done by surrounding it with a combination of single quotes and backticks. ([View Highlight](https://read.readwise.io/read/01kgdvj4k0t3d6dyh309gr717m)) ^983989849
- In such a case, Haddock defaults to pointing to the type. The ambiguity can be overcome by explicitly specifying a namespace, by way of a `v` (for value) or `t` (for type) immediately before the link ([View Highlight](https://read.readwise.io/read/01kgdvm817a2k7apvw4mrc8ga1)) ^983989910
- This is /emphasized text/, __bold text__ and @monospaced text@. ([View Highlight](https://read.readwise.io/read/01kgdvprrs1yr9ajebgtkjjv6z)) ^983989966
- Linking to a module is done by surrounding the module name with double quotes ([View Highlight](https://read.readwise.io/read/01kgdvqqf9zw7nf4adaa9s1xs9)) ^983989990
- -- [@foo@]: The description of @foo@. ([View Highlight](https://read.readwise.io/read/01kgdvrp3savndsr9j6tgbzn12)) ^983990010
- Inspired by reSTs grid tables, Haddock supports a complete table representation via grid-like “ASCII art”. ([View Highlight](https://read.readwise.io/read/01kgdvs9vrk7wd2wtvb7016hfe)) ^983990032
- Headings inside of comment documentation are possible by preceding them with a number of `=`s. ([View Highlight](https://read.readwise.io/read/01kgdvssrvrbtjfqysd9vmr9gg)) ^983990060