dramforever/vscode-ghc-simple

Could not load module, It is a member of the hidden package

kirillFedorov1 opened this issue · 3 comments

Is there a way to get rid of this error? My project compiles well, as I added required dependencies in the .cabal file. But it doesn't help with the extension and it keeps notifying about the error. The thing is the type viewing doesn't work until there aren't any errors.

Try loading your project in GHCI and fix the error there, then the extension will follow. If your replCommand is the default one, then make surestack ghci can load your project correctly.
If you only want to expose the hidden package, then you can load the extension with ":set -package PackageName" by adding that line to the extension's startupCommands

Restarting vscode fixed the issue. It seems there nothing to do but to restart vscode every time the module block is being modified.

Currently this extension does not know to restart GHCi, so if you change your stack.yaml or *.cabal you need to restart GHCi manually. Just run the command 'Restart GHCi sessions'. It's mentioned here in the readme https://github.com/dramforever/vscode-ghc-simple#basic-usage.

Watching for file changes like that and automatically restarting is probably a future direction