Closed mrkafk closed 4 years ago
Hi! Your package.yaml states the lib modules should be inside the src subdir but i dont see Lib.hs in the log. Maybe you need to add a exposed-modules field in the library section? Does stack build work without errors?
stack build
runs without problems. The program executes. I still get the error.
P.S. I created the project by stack new helloworld new-template
. After that I just adjusted stack.yaml
with resolver: lts-14.2
.
Unfortunately, that is a known error, duplicate of #1608
Sorry, you are running into this.
Work around: provide a custom hie.yaml
. In your particular case,
cradle:
stack:
Should suffice. For more complex hie.yaml
configurations take a look at https://github.com/haskell/haskell-ide-engine/#project-configuration
Well, in my case i've reproduced the error at first but after a stack build
and restart vscode, hie loads the app/Main.hs
correctly.
The behaviour is reproducible:
.stack-work
and $(stack path --snapshot-install-root)
Main.hs
---> errorstack build
Main.hs
file --> works Yeah, it is on and off. I think somewhere we found a semi reproducible set of steps. But it is definitely related to cabal-helper and stack.
@mrkafk did you experience that behaviour? in my case after running stack build
and restarting hie, the Main.hs
file is loaded succesfully
Hello Javier,
Thank you for looking into this problem!
Anyway, I reproduced your steps and it worked indeed. At first.
Then I started writing another function in Main.hs
and the weird thing happened: while autocompletion works, e.g. when starting to type "put.." (StrLn autocompletion popping up), now the same original error keeps popping up. This does not prevent HIE from working however, at least in basic sense.
@fendor Your workaround works fine. Thank you!
@mrkafk ok, so i'll close this one if you dont mind and we will tracking this in #1608
When opening project https://github.com/mrkafk/helloworld in VSCode, I keep getting errors like in title. HIE log below.
My
settings.json
:HIE log:
stack clean
andstack build
do not help.