Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ambiguous module name `Prelude'

Tags:

haskell

xmonad

I get this when i want to recompile xmonad to change the configuration:

Implicit import declaration:
    Ambiguous module name `Prelude':
      it was found in multiple packages: base haskell98-2.0.0.0

Xmonad was installed via pacman. When i got this error i removed xmonad from pacman and then tried to cabal install xmonad. I got the above error again but i was able to solve it by removing haskell98 from the cabal file.

Now i want to reconfigure xmonad with MOD-Q the error reappears and i have no clue how to fix this. Any help appreciated.

I use GHC version 7.0.3 (from Haskell platform)

like image 919
somesoaccount Avatar asked Sep 07 '11 19:09

somesoaccount


2 Answers

Try this:

ghc-pkg hide haskell98
like image 56
sclv Avatar answered Oct 05 '22 13:10

sclv


In my case hiding haskell98 unfortunately was insufficient, I had to remove the obsolete haskell98 from the build-depends list in my .cabal build file (keeping the base >= 4 of course). It read before:

build-depends:  
    base >= 4,
    haskell98

... and then ...

build-depends:  
    base >= 4

With that the error message "Ambiguous module name `Prelude'" above disappeared.

like image 24
Hartmut Pfarr Avatar answered Oct 05 '22 12:10

Hartmut Pfarr