dramforever/vscode-ghc-simple

[Question] How to make documentation for system modules appear?

Stexxe opened this issue · 2 comments

When I hover over the function it says:

putStrLn :: String -> IO () -- Defined in ‘System.IO’
ghc-9.0.2: Can't find any documentation for System.IO. This is probably because the module was compiled without -haddock, but it's also possible that the module contains no documentation.
Try re-compiling with -haddock.

Could you please tell me how to recompile system modules with -haddock (I use stack)? Or maybe I should use an older version of ghc?

I've fixed it by switching to ghc 8.10.4 (lts-18.6).

This is interesting. Perhaps something had changed between stack's GHC libraries between the two versions.

For the record, I just use the :doc command of GHCi and honestly I have no idea how exactly I can get docs for it all the time. It does seem to work with the 'current project' better than dependency libraries.