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

GHC ghc-devs at haskell.org
Tue Oct 22 16:49:40 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
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by nomeata):

 I find it strange to arrange feedback primarily targeted for human
 consumption in a way that suits programs. Either the programs use a
 different interface, e.g. some `ghc --machine-parsable-errors` option (in
 which case a properly machine-readable format like XML or JSON might be
 good), or they simply have to learn to parse the format that the compiler
 generates for its human users.

 A compromise would be a format that is both easy to read by humans, but
 requires little adjustment in error message parsers:

 {{{
 src/main.hs:334:23:
 src/main.hs:338:23:
 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
 }}}

 But it’s indeed minor, so if there is disagreement, then its probably not
 worth working on.

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


More information about the ghc-tickets mailing list