Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Project cannot have multiple Main:main modules #770

Closed
ajeetdsouza opened this issue Aug 18, 2018 · 3 comments
Closed

Project cannot have multiple Main:main modules #770

ajeetdsouza opened this issue Aug 18, 2018 · 3 comments
Milestone

Comments

@ajeetdsouza
Copy link
Contributor

ajeetdsouza commented Aug 18, 2018

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?

@giuliohome
Copy link

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.

@lukel97
Copy link
Collaborator

lukel97 commented Oct 17, 2018

@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

@lukel97 lukel97 closed this as completed Oct 17, 2018
@alanz alanz added this to the prehistory milestone Feb 2, 2019
@abevoelker
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants