summaryrefslogtreecommitdiff
path: root/testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr
diff options
context:
space:
mode:
authorZubin Duggal <zubin@cmi.ac.in>2022-03-12 00:07:56 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-23 13:39:39 -0400
commitb91798be48d9fa02610b419ccea15a7dfd663823 (patch)
treefb87654ccd4a1e92e8c7a15bf454a867460869a3 /testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr
parent52ffd38c610f418ee1d1a549cfdfdaa11794ea40 (diff)
downloadhaskell-b91798be48d9fa02610b419ccea15a7dfd663823.tar.gz
hi haddock: Lex and store haddock docs in interface files
Names appearing in Haddock docstrings are lexed and renamed like any other names appearing in the AST. We currently rename names irrespective of the namespace, so both type and constructor names corresponding to an identifier will appear in the docstring. Haddock will select a given name as the link destination based on its own heuristics. This patch also restricts the limitation of `-haddock` being incompatible with `Opt_KeepRawTokenStream`. The export and documenation structure is now computed in GHC and serialised in .hi files. This can be used by haddock to directly generate doc pages without reparsing or renaming the source. At the moment the operation of haddock is not modified, that's left to a future patch. Updates the haddock submodule with the minimum changes needed.
Diffstat (limited to 'testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr')
-rw-r--r--testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr24
1 files changed, 16 insertions, 8 deletions
diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr
index 5cd0a59a05..8488d159fe 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/haddockA036.stderr
@@ -2,13 +2,21 @@
==================== Parser ====================
module ConstructorFields where
data Foo
- = " doc on `Bar` constructor" Bar Int String |
- " doc on the `Baz` constructor"
- Baz Int " doc on the `Int` field of `Baz`" String " doc on the `String` field of `Baz`" |
- " doc on the `:+` constructor" Int :+ String |
- " doc on the `:*` constructor"
- Int " doc on the `Int` field of the `:*` constructor" :* String " doc on the `String` field of the `:*` constructor" |
- " doc on the `Boo` record constructor" Boo {x :: ()} |
- " doc on the `Boa` record constructor" Boa {y :: ()}
+ = -- | doc on `Bar` constructor
+ Bar Int String |
+ -- | doc on the `Baz` constructor
+ Baz -- | doc on the `Int` field of `Baz`
+ Int -- | doc on the `String` field of `Baz`
+ String |
+ -- | doc on the `:+` constructor
+ Int :+ String |
+ -- | doc on the `:*` constructor
+ -- | doc on the `Int` field of the `:*` constructor
+ Int :* -- | doc on the `String` field of the `:*` constructor
+ String |
+ -- | doc on the `Boo` record constructor
+ Boo {x :: ()} |
+ -- | doc on the `Boa` record constructor
+ Boa {y :: ()}