@@ -32,6 +32,7 @@ import Distribution.Server.Packages.ModuleForest
32
32
import Distribution.Server.Packages.Render
33
33
import Distribution.Server.Users.Types (userStatus , userName , isActiveAccount )
34
34
import Data.TarIndex (TarIndex )
35
+ import qualified Data.TarIndex as Tar
35
36
36
37
import qualified Distribution.ModuleName as Module
37
38
import Distribution.ModuleName (ModuleName )
@@ -313,19 +314,20 @@ moduleSection render mdocIndex docURL quickNav =
313
314
, renderModuleForest docURL s ]
314
315
else [] ) ++
315
316
(if not (null m)
316
- then [ h2 << " Modules"
317
- , renderModuleForest docURL m ]
318
- else [] ) ++
319
- [renderDocIndexLink]
320
- renderDocIndexLink
321
- | isJust mdocIndex =
322
- let docIndexURL = docURL </> " doc-index.html"
317
+ then [ h2 << " Modules" ] ++
318
+ [renderDocIndexLink] ++
319
+ [renderModuleForest docURL m ]
320
+ else [] )
321
+ renderDocIndexLink = case mdocIndex of
322
+ Just tindex ->
323
+ let docIndexURL | isJust (Tar. lookup tindex " doc-index-All.html" ) = docURL </> " doc-index-All.html"
324
+ | otherwise = docURL </> " doc-index.html"
323
325
in paragraph ! [thestyle " font-size: small" ]
324
326
<< (" [" +++ anchor ! [href docIndexURL] << " Index" +++ " ]" +++
325
327
(if quickNav
326
328
then " [" +++ anchor ! [identifier " quickjump-trigger" , href " #" ] << " Quick Jump" +++ " ]"
327
329
else mempty ))
328
- | otherwise = mempty
330
+ Nothing -> mempty
329
331
330
332
propertySection :: [(String , Html )] -> [Html ]
331
333
propertySection sections =
0 commit comments