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

"module ***:Main is defined in multiple files" [atom / monorepo configuration / ghc8.2.2] #606

Closed
OlivierSohn opened this issue Jun 1, 2018 · 4 comments
Milestone

Comments

@OlivierSohn
Copy link

I followed the installation procedure, ran on master branch:

stack --stack-yaml=stack-8.2.2.yaml install

and installed the atom plugins :

apm install language-haskell atom-ide-ui ide-haskell-hie

Then when opening atom for my project I see the error :

Got error while processing diagnostics: : error: module ‘main:Main’ is defined in multiple files:
/private/var/folders/25/p3lxc5td4kg2q0bnpvy90wrc0000gn/T/ghc-mod14097/Main14096-0.hs
/private/var/folders/25/p3lxc5td4kg2q0bnpvy90wrc0000gn/T/ghc-mod14098/Main14096-1.hs

When saving a file in imj-space project, I have a similar message:

Got error while processing diagnostics: : error: module ‘imj-space-0.1.0.3:Main’ is defined in multiple files:
/private/var/folders/25/p3lxc5td4kg2q0bnpvy90wrc0000gn/T/ghc-mod14105/Spec14096-9.hs
/private/var/folders/25/p3lxc5td4kg2q0bnpvy90wrc0000gn/T/ghc-mod14097/Main14096-0.hs
/private/var/folders/25/p3lxc5td4kg2q0bnpvy90wrc0000gn/T/ghc-mod14098/Main14096-1.hs 

And then I see no diagnostic panel.

How can I fix it?

Note that I build my project with stack-lts-11.9, the same as the one used to build haskell-ide-engine

@nasyxx
Copy link

nasyxx commented Jun 2, 2018

The same.

Got error while processing diagnostics: : error: module ‘main:Main’ is defined in multiple files: 
/private/var/folders/sn/pv0g90nd1j1cw20ct_7bpl100000gn/T/ghc-mod72362/site72360-273.hs 
/private/var/folders/sn/pv0g90nd1j1cw20ct_7bpl100000gn/T/ghc-mod72361/Main72360-551.hs

@alxdb
Copy link

alxdb commented Jun 11, 2018

this should be merged with #620

@lolepezy
Copy link

lolepezy commented Jun 18, 2018

The same for me (ghc 8.2.2):
Got error while processing diagnostics: : error: module ‘stm-ixset-0.1.0.0:Main’ is defined in multiple files: /private/var/folders/tf/w30cyv8d7c34thtj_4mcrnqh0000gq/T/ghc-mod31847/Bench31842-6.hs /private/var/folders/tf/w30cyv8d7c34thtj_4mcrnqh0000gq/T/ghc-mod31845/Spec31842-3.hs

having benchmarks and specs make the HIE go nuts about 'main' functions.

@alanz
Copy link
Collaborator

alanz commented Jun 19, 2018

We will track progress in #620, sorry for the duplicate.

@alanz alanz closed this as completed Jun 19, 2018
@alanz alanz added this to the prehistory milestone Feb 2, 2019
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