1

I created an application with EclipseFP, the yesod application. With the out of the box settings, I get an error when I try to run a 'main.hs' file. It looks like it compiles but when I try to run I get the error. I attempted to run by 'right clicking' and then 'run'. The console opens:

What might be the issue?

    Here is the error:
    <command line>:
        Could not find module `OverlappingInstances':
          Use -v to see a list of the files searched for.
Failed, modules loaded: none.
Prelude> main

Version: Indigo Service Release 2
Eclipse FP Haskell Plugin - 2.2.4
GHC version 7.0.3

Possible solutions:

I tried to add '{-# LANGUAGE OverlappingInstances #-}' at the top of all of the haskell files

chreekat
  • 974
  • 7
  • 16
Berlin Brown
  • 11,504
  • 37
  • 135
  • 203
  • 4
    What does the code look like? The error message looks like there's an `import OverlappingInstances` even though that's a language extension and thus is included differently (e.g. Cabal file or a `{#- LANUGAGE ... -#}` pragma). –  Apr 23 '12 at 18:42
  • 4
    Since the error message references the command line rather than some line number in a file, I'm guessing it's a misspelled `-XOverlappingInstances` flag. – hammar Apr 23 '12 at 18:58
  • Ok, the code doesn't have a reference to anything overlapping, overlapping instance. – Berlin Brown Apr 23 '12 at 19:13
  • @BerlinBrown can you post the actual code that is causing this? Try to reduce the file down to the smallest thing possible that still exhibits this error. – Dan Burton Apr 24 '12 at 04:36
  • What Dan Burton said. Though if hammar is right, then you may be able to reproduce the issue with a completely empty file because the problem may be in some EclipseFP setting somewhere. – Tyler Apr 25 '12 at 09:53

1 Answers1

1

This is a bug, I've fixed it in the github version of EclipseFP/BuildWrapper. Will be part of the 2.3.0 release of EclipseFP. We're getting the wrong options from the cabal file and pass OverlappingInstances to GHCi without the -X. Sorry!

JP Moresmau
  • 7,388
  • 17
  • 31
  • Incidentally I deleted some parts out of my (originally hand edited) .cabal file and it no longer tried to pass the OverlappingInstances. There was also some other weirdness where it was adding modules to the dependencies in the UI - then I opened the .cabal file and found it had put some hs-source-dirs: at the end of my dependencies: section (on the same indent level as the dependencies). But as I said - deleted some parts out of it and added it through the UI and it played nice. – Oliver Jun 06 '12 at 09:41