[GHC] #15487: "Ambiguos occurrence" error message uses strange qualification

#15487: "Ambiguos occurrence" error message uses strange qualification -------------------------------------+------------------------------------- Reporter: j.waldmann | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following text produces an error message that I find somewhat confusing. This issue is just about the wording of the message. {{{#!hs module A (null) where { } module B where { import qualified A ; null = 42 ; main = null } }}} when I load `B` in ghci, I get {{{ B.hs:1:58: error: Ambiguous occurrence ‘null’ It could refer to either ‘A.null’, imported from ‘Prelude’ at B.hs:1:8 (and originally defined in ‘Data.Foldable’) or ‘B.null’, defined at B.hs:1:39 }}} I think ".. could refer to A.null" looks strange. I would expect `Prelude.null` here, which I do get when I remove "import qualified A" from the text of `B`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15487 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15487: "Ambiguos occurrence" error message uses strange qualification -------------------------------------+------------------------------------- Reporter: j.waldmann | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): A fix is on `wip/T13064`, and will land when that does. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15487#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15487: "Ambiguos occurrence" error message uses strange qualification
-------------------------------------+-------------------------------------
Reporter: j.waldmann | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#15487: "Ambiguos occurrence" error message uses strange qualification -------------------------------------+------------------------------------- Reporter: j.waldmann | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | rename/should_fail/T15487 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: => rename/should_fail/T15487 * resolution: => fixed Comment: Great report. We now get {{{ T15487.hs:7:9: error: Ambiguous occurrence ‘null’ It could refer to either ‘Prelude.null’, imported from ‘Prelude’ at T15487.hs:1:8-13 (and originally defined in ‘Data.Foldable’) or ‘T15487.null’, defined at T15487.hs:5:1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15487#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC