-
-
Notifications
You must be signed in to change notification settings - Fork 389
Program error: Failed to load interface for ‘Main’ no unit id matching ‘main’ was found #204
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
The issue was missing |
Hey! I have encountered the same issue, the reason is GHC will auto-insert the module declaration (if it is missing) and add Main.hs to the unit Earlier today, I actually looked into your repo's since I had the suspicion regarding module declarations but in the linked repo, the module declaration was present. Did you change that locally or something? |
I added the |
I cant reproduce with lastest hls and a Main module without the header, @xwvvvvwx could you confirm it it is fixed for you too? |
I can still reproduce with |
Thanks for checking it again, it is possible that the os could be related (i am on windows) but i assumed that it should not be. |
No, it is close to impossible that the OS is related. I will check if I can still reproduce it and if it is actually what I think it is. |
@fendor did you have the opportunity of checking if it is reproduced? |
I can't reproduce it anymore and furthermore, I would expect #1435 fixes it for good, too. |
I have this error in the main executable file in a two projects (
hevm
, andact
).In both of these projects
haskell-language-server
works very well (type checking / doc lookup / jump to definition) in all files except the main executable (Main.hs
inact
andhevm-cli.hs
inhevm
).cabal new-build
works without errors in both projects.I am using a globally installed version of
hakell-language-server
built againstghc8.6.5
using the nix deritvations here.The full output from running
haskell-language-server
from the root of theact
repo is here.If you want to reproduce the issue locally, it's probably easiest to use the
act
project. Theshell.nix
in the repo root can be used to prepare a working build environment, but does not currently include an installation ofhaskell-language-server
itself.The text was updated successfully, but these errors were encountered: