summaryrefslogtreecommitdiff
path: root/rules
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 /rules
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 'rules')
-rw-r--r--rules/haddock.mk7
1 files changed, 0 insertions, 7 deletions
diff --git a/rules/haddock.mk b/rules/haddock.mk
index 4f084f86e3..b6d8e97051 100644
--- a/rules/haddock.mk
+++ b/rules/haddock.mk
@@ -66,7 +66,6 @@ endif
"$$(TOP)/$$(INPLACE_BIN)/haddock" \
--verbosity=0 \
--odir="$1/$2/doc/html/$$($1_PACKAGE)" \
- --no-tmp-comp-dir \
--dump-interface=$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) \
--html \
--hoogle \
@@ -83,12 +82,6 @@ endif
$$(EXTRA_HADDOCK_OPTS) \
+RTS -t"$$(TOP)/testsuite/tests/perf/haddock/$$($1_PACKAGE).t" --machine-readable
-# --no-tmp-comp-dir above is important: it saves a few minutes in a
-# validate. This flag lets Haddock use the pre-compiled object files
-# for the package rather than rebuilding the modules of the package in
-# a temporary directory. Haddock needs to build the package when it
-# uses the Template Haskell or Annotations extensions, for example.
-
# Make the haddocking depend on the library .a file, to ensure
# that we wait until the library is fully built before we haddock it
$$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) : $$($1_$2_$$(HADDOCK_WAY)_LIB)