[GHC] #13168: Ambiguous interface errors in GHCi, even with -XPackageImports

GHC ghc-devs at haskell.org
Sun Jan 22 19:03:24 UTC 2017


#13168: Ambiguous interface errors in GHCi, even with -XPackageImports
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.0.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  GHC rejects
  Unknown/Multiple                   |  valid program
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Originally reported in https://github.com/haskell/cabal/issues/4253, but I
 moved it here after being reassured that this was a GHCi bug, not a
 `Cabal` one.

 To reproduce this issue, you'll need to install two libraries that export
 two constructors with the same name. The original issue uses `GLFW` and
 `GLFW-b` as examples, but for the puposes of test case minimalization,
 I've prepared a repo here (https://github.com/RyanGlScott/cabal-gh4253)
 with as small of an example as I can manage. To reproduce the issue, do
 the following:

 {{{
 $ git clone https://github.com/RyanGlScott/cabal-gh4253
 $ cd cabal-gh4253/
 $ cabal install package1/ package2/
 $ ghci -XPackageImports
 GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 λ> import "package1" DuplicateModuleName
 λ> Window

 <interactive>:1:1: error:
     Ambiguous interface for ‘DuplicateModuleName’:
       it was found in multiple packages:
       package1-0.1.0.0 package2-0.1.0.0
 }}}

 This seems to be specific to GHCi, because I cannot find a way to trigger
 the same issue with `ghc --make`.

 I've reproduced this with GHC 8.0.2 and HEAD.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13168>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list