[GHC] #15487: "Ambiguos occurrence" error message uses strange qualification
GHC
ghc-devs at haskell.org
Tue Aug 7 12:59:59 UTC 2018
#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
More information about the ghc-tickets
mailing list