Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions haddock-api/src/Haddock/Backends/Xhtml.hs
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,16 @@ ppJsonIndex odir maybe_source_url maybe_wiki_url unicode pkg qual_opt ifaces ins
(errors, installedIndexes) <-
partitionEithers
<$> traverse
(\ifaceFile ->
(\ifaceFile -> do
let indexFile = takeDirectory ifaceFile
FilePath.</> "doc-index.json" in
bimap (indexFile,) (map (fixLink ifaceFile))
<$> eitherDecodeFile @[JsonIndexEntry] indexFile)
FilePath.</> "doc-index.json"
a <- doesFileExist indexFile
if a then
bimap (indexFile,) (map (fixLink ifaceFile))
<$> eitherDecodeFile @[JsonIndexEntry] indexFile
else
return (Right [])
)
installedIfacesPaths
traverse_ (\(indexFile, err) -> putStrLn $ "haddock: Coudn't parse " ++ indexFile ++ ": " ++ err)
errors
Expand Down