[GHC] #8466: Aggregate “ambiguous import” errors for the same name

GHC ghc-devs at haskell.org
Sun Oct 20 19:46:47 UTC 2013


#8466: Aggregate “ambiguous import” errors for the same name
------------------------------------+-------------------------------------
       Reporter:  nomeata           |             Owner:
           Type:  feature request   |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.6.3
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 When porting legacy code, such an error happens frequently. But instead of

 {{{
 [5 of 5] Compiling Main             ( src/main.hs, dist/build/DAG-
 Tournament/DAG-Tournament-tmp/Main.o )

 src/main.hs:302:23:
     Ambiguous occurrence `eventButton'
     It could refer to either `Graphics.UI.Gtk.eventButton',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventButton',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:302:54:
     Ambiguous occurrence `eventClick'
     It could refer to either `Graphics.UI.Gtk.eventClick',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventClick',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:305:23:
     Ambiguous occurrence `eventButton'
     It could refer to either `Graphics.UI.Gtk.eventButton',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventButton',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:305:54:
     Ambiguous occurrence `eventClick'
     It could refer to either `Graphics.UI.Gtk.eventClick',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventClick',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:330:23:
     Ambiguous occurrence `eventModifier'
     It could refer to either `Graphics.UI.Gtk.eventModifier',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventModifier',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:332:23:
     Ambiguous occurrence `eventModifier'
     It could refer to either `Graphics.UI.Gtk.eventModifier',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventModifier',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:334:23:
     Ambiguous occurrence `eventKeyName'
     It could refer to either `Graphics.UI.Gtk.eventKeyName',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:338:23:
     Ambiguous occurrence `eventKeyName'
     It could refer to either `Graphics.UI.Gtk.eventKeyName',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33

 src/main.hs:345:23:
     Ambiguous occurrence `eventKeyName'
     It could refer to either `Graphics.UI.Gtk.eventKeyName',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33
 }}}

 I’d really prefer to read

 {{{
 [5 of 5] Compiling Main             ( src/main.hs, dist/build/DAG-
 Tournament/DAG-Tournament-tmp/Main.o )

 src/main.hs:302:23:
     Ambiguous occurrence `eventButton'
     It could refer to either `Graphics.UI.Gtk.eventButton',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventButton',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33
 (also at src/main.hs:305:23,

 src/main.hs:302:54:
     Ambiguous occurrence `eventClick'
     It could refer to either `Graphics.UI.Gtk.eventClick',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventClick',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33
 (also at src/main.hs:305:54)

 src/main.hs:330:23:
     Ambiguous occurrence `eventModifier'
     It could refer to either `Graphics.UI.Gtk.eventModifier',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventModifier',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33
 (also at src/main.hs:332:23)

 src/main.hs:334:23:
     Ambiguous occurrence `eventKeyName'
     It could refer to either `Graphics.UI.Gtk.eventKeyName',
                              imported from `Graphics.UI.Gtk' at
 src/main.hs:10:1-22
                              (and originally defined in
 `Graphics.UI.Gtk.Gdk.EventM')
                           or `Graphics.UI.Gtk.Gdk.Events.eventKeyName',
                              imported from `Graphics.UI.Gtk.Gdk.Events' at
 src/main.hs:12:1-33
 (also at src/main.hs:338:23 and src/main.hs:345:23)
 }}}

 or some other kind of aggregation of the information.

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


More information about the ghc-tickets mailing list