aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-14 17:12:56 +1000
committerYuchen Pei <hi@ypei.me>2022-09-14 18:54:30 +1000
commitbcf7e7e7fd7ef236a88ad1dcad6692a340e34687 (patch)
tree38d4b6b79d2ba8cbf42d01c7451e5185d2e33ebc
parenta0691d9b7c2d9eab53f2dc38d2d9a45be94ed77f (diff)
removed custom ids for packages and modules
they are not really used in links
-rw-r--r--haddock-api/src/Haddock/Backends/Org.hs16
1 files changed, 6 insertions, 10 deletions
diff --git a/haddock-api/src/Haddock/Backends/Org.hs b/haddock-api/src/Haddock/Backends/Org.hs
index 613cc6ef..11be4338 100644
--- a/haddock-api/src/Haddock/Backends/Org.hs
+++ b/haddock-api/src/Haddock/Backends/Org.hs
@@ -207,22 +207,18 @@ toOrgDocument title mbPrologue pkgId ifaces =
processPackage
:: String -> Maybe (Doc RdrName) -> String -> [Interface] -> [OrgBlock]
processPackage title mbPrologue pkgId ifaces =
- Heading packageLevel
- [plaintext title]
- (cIdProp pkgId ++ hackageProp (hackagePackageUrl pkgId))
+ Heading packageLevel [plaintext title] (hackageProp (hackagePackageUrl pkgId))
: Paragraph [plaintext $ maybe [] removeMarkup' mbPrologue]
: concatMap processModule (sortOn ifaceMod ifaces)
processModule :: Interface -> [OrgBlock]
processModule iface =
let
- mdl = moduleString $ ifaceMod iface
- pkg = cleanPkgStr $ unitString $ moduleUnit $ ifaceMod iface
- path = (pkg, mdl)
- heading = Heading
- modLevel
- [plaintext mdl]
- (cIdProp (pkg ++ "." ++ mdl) ++ hackageProp (hackageModuleUrl pkg mdl))
+ mdl = moduleString $ ifaceMod iface
+ pkg = cleanPkgStr $ unitString $ moduleUnit $ ifaceMod iface
+ path = (pkg, mdl)
+ heading =
+ Heading modLevel [plaintext mdl] (hackageProp (hackageModuleUrl pkg mdl))
description = ppDocumentation (ifaceRnDoc iface) (Just modLevel)
exported =
evalState (mapM (processExport path) (ifaceRnExportItems iface)) modLevel