Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4958 closed bug (wontfix)

Ambiguous module name `Prelude' (base haskell98-

Reported by: EvgenijM86 Owned by:
Priority: normal Milestone:
Component: Prelude Version: 7.1
Keywords: haskell-src Prelude Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I was trying to compile haskell-src- with ghc-7.1.20110213 and got this error message:

evgenij@evgenij-dsk:~$ cabal install --reinstall --with-compiler=/home/evgenij/ghc-7.1.20110213/bin/ghc haskell-src-
Resolving dependencies...
Configuring haskell-src-
Preprocessing library haskell-src-
shift/reduce conflicts:  2
Building haskell-src-

Implicit import declaration:
    Ambiguous module name `Prelude':
      it was found in multiple packages: base haskell98-
cabal: Error: some packages failed to install:
haskell-src- failed during the building phase. The exception was:
ExitFailure 1

I don't know if this is specific to ghc-7.1.20110213 or some other 7.x.x versions are affected (it did compile on 6.12.3 though). Adding --ghc-option="-hide-package haskell98-" seems to have no effect.

Change History (2)

comment:1 Changed 6 years ago by simonmar

Resolution: wontfix
Status: newclosed

GHC starting with version 7.2.1 will not support using the haskell98 package and the base package at the same time. The haskell-src package has both of these in its build-depends, so it will need to be modified. Most of the time, what you want to do is remove haskell98 from build-depends, and fix up any imports of Haskell 98 modules to point to their base equivalents.

comment:2 Changed 6 years ago by EvgenijM86

Yes, removing haskell98 from .cabal file seems to have fixed it - it did compile without errors. It looks like it didn't have any imports to haskell98, because according to comment in .cabal file:

-- The dependency on Haskell 98 is only because -- Happy generates a parser that imports Array

thank you for your help.

Note: See TracTickets for help on using tickets.