The lookupHtmlForModule function in src/Haskell/Ide/Engine/Plugin/Haddock.hs fails to find the source HTML document when the path if formatted with dots instead of dashes.
lookupHtmlForModule mkDocPath df m = do
let mfp = go <$> (listToMaybe =<< lookupHtmls df ui)
exists <- maybe (pure False) doesFileExist mfp
return $ if exists then mfp else Nothing
where
go pkgDocDir = mkDocPath pkgDocDir mn
ui = moduleUnitId m
mn = map (\x -> if x == '.' then '-' else x) mns
mns = moduleNameString $ moduleName m
E.g. it can find the documentation HTML here: /home/bart/.stack/snapshots/x86_64-linux-tinfo6/....../8.6.5/doc/hakyll-4.13.0.1/Hakyll-Core-Rules.html
But it cannot find the source HTML here: /home/bart/.stack/snapshots/x86_64-linux-tinfo6/...../8.6.5/doc/hakyll-4.13.0.1/src/Hakyll.Core.Rules.html
The implementor on the IRC said:
A simple fix would be to check for both versions of the file, with the '.' and with '-', and simply return whichever one exists on disk
The
lookupHtmlForModule
function in src/Haskell/Ide/Engine/Plugin/Haddock.hs fails to find the source HTML document when the path if formatted with dots instead of dashes.E.g. it can find the documentation HTML here:
/home/bart/.stack/snapshots/x86_64-linux-tinfo6/....../8.6.5/doc/hakyll-4.13.0.1/Hakyll-Core-Rules.html
But it cannot find the source HTML here:
/home/bart/.stack/snapshots/x86_64-linux-tinfo6/...../8.6.5/doc/hakyll-4.13.0.1/src/Hakyll.Core.Rules.html
The implementor on the IRC said: