-
-
Notifications
You must be signed in to change notification settings - Fork 389
CodeLens tries to rename module name to match the filename when the file is listed in the "main-is" section of the cabal file #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this issue is already fixed in #616, which will be included in upcoming monthly release. |
Hmmm, I don't think #616 will fix this. For example, hls will still try to rename the module name of "test/Spec.hs" from |
The plugin provides just a suggestion, it doesn't force you to do anything. Naturally, it would be nice to solve the issue, but where would the necessary metadata come from? |
Hmm, it seems that flags given by |
By parsing the cabal file? I feel like hie-bios is responsible for this. Unfortunately, I'm not really familiar with how HLS works under the hood so I can't answer that question. |
IIUC, currently the shake system does not store component details like |
Parsing the cabal file could be the way to go, and it would be already in scope if we recover the hie package plugin #155. But it is not the case for now. |
The module name of the file that "main-is" is pointing to should always be
Main
.Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 0.6.0.0 (GHC: 8.10.2) (PATH: /nix/store/aa763nk6yn1hdjqcwj9l7slkfl52i61d-haskell-language-server-0.6.0.0/bin/haskell-language-server-wrapper) Tool versions found on the $PATH cabal: 3.2.0.0 stack: Not found ghc: 8.10.2
VSCode
The text was updated successfully, but these errors were encountered: