Haskell-ide-engine: Project cannot have multiple Main:main modules

Created on 18 Aug 2018  Â·  3Comments  Â·  Source: haskell/haskell-ide-engine

I have a folder filled with small independent .hs programs for my experiments with Haskell. There are no cabal or stack configuration files since it is not an actual project (I run individual files in it with runghc). However, I cannot seem to use HIE with it since all of the files have their own Main:main.

Starting from when I open the second file, I get a warning notification after every edit: Got error while processing diagnostics: : error: module ‘main:Main’ is defined in multiple files, after which nothing works (confirmed on Atom and VS Code).

Is there any way I can get HIE to work with this?

Most helpful comment

Is there a feature ticket for this I could subscribe to updates on? Poked around and searched a bit but couldn't find one.

All 3 comments

For some unknown reasons, I see this problem/error (Got error while processing diagnostics: <no location info>: ...) also if I open the haskell-ide-engine folder itself from VS code, after which HIE stops working. Aside from that and more importantly, it is _common practice_ with VS code to open a folder which is _not_ a single project. Is there at least a _quick workaround_ (or a rapid code change) to detour this issue? Even mitigating the fact that HIE completely stops working would be a fair progress imo.

@giuliohome hie doesn't support multiple workspaces at the moment, but recently the library that it's built upon, haskell-lsp, added support for the new multi-workspace stuff in the LSP specification. I'll create a new feature ticket for this, there's several loose tickets about this sitting around needing aggregated

Is there a feature ticket for this I could subscribe to updates on? Poked around and searched a bit but couldn't find one.

Was this page helpful?
0 / 5 - 0 ratings