-
Notifications
You must be signed in to change notification settings - Fork 206
Cannot have two "Main" modules open at the same time #620
Comments
The problem is with the mappedStrs <- getMMappedFilePaths
let targetStrs = mappedStrs ++ map moduleNameString mns ++ cfns We need to filter out any know main modules from that list, by inspecting the cabal component graph, and marking any successfully loaded main modules. |
As pointed out by @wz1000 on IRC, we should be able to reinstate |
@alanz
I've got a project setup like:
Where each directory has a
Should the above version have this update included or am I missing something? |
@ahpearce And you do not have any cabal or stack files? |
@alanz
|
I have the same error with same setup as @ahpearce - no cabal or stack project, just number of .hs files, each .hs has Main module. I'm on Windows 10, if that matters. As a workaround, I created a simple project
With this setup there is no error about multiple Main modules. Still, plain GHC project would be much more convenient for my purposes. It'd be awesome if that error went away. |
Any update on this? Still have this issue in VS Code with the same setup as @ahpearce. |
hello, anyone working on this? |
Assuming you have a correct stack or cab project, e.g. Cabal build or stack build succeed, this problem does not occur on current master |
e.g., working on hie, if
app/MainHie.hs
andtest/Functional.hs
are both loaded, we getNote: I think is because we put all the mapped files into the targets list in ghc-mod when loading.
The text was updated successfully, but these errors were encountered: