[GHC] #10579: full module names of names not in scope have gone missing in ghci

GHC ghc-devs at haskell.org
Mon Jul 6 22:51:29 UTC 2015


#10579: full module names of names not in scope have gone missing in ghci
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                   Owner:  simonpj
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  GHCi              |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by ezyang):

 * owner:   => simonpj


Comment:

 This was done purposely, but it does seem like the case here was an
 unintended consequence.  The relevant code is (noting that
 ParserCombinators is from base):

 {{{
   qual_name mod occ
         | [] <- unqual_gres
         , modulePackageKey mod `elem` [primPackageKey, basePackageKey,
 thPackageKey]
         , not (isDerivedOccName occ)
         = NameUnqual   -- For names from ubiquitous packages that come
 with GHC, if
                        -- there are no entities called unqualified 'occ',
 then
                        -- print unqualified.  Doing so does not cause
 ambiguity,
                        -- and it reduces the amount of qualification in
 error
                        -- messages.  We can't do this for all packages,
 because we
                        -- might get errors like "Can't unify T with T".
 But the
                        -- ubiquitous packages don't contain any such
 gratuitous
                        -- name clashes.
                        --
                        -- A motivating example is 'Constraint'. It's often
 not in
                        -- scope, but printing GHC.Prim.Constraint seems
 overkill.
 }}}

 from

 {{{
 commit 547c597112954353cef7157cb0a389bc4f6303eb
 Author: Simon Peyton Jones <simonpj at microsoft.com>  Tue Apr  7 05:48:30
 2015
 Committer:      Simon Peyton Jones <simonpj at microsoft.com>  Tue Apr  7
 07:10:22 2015

 Reduce module qualifiers in pretty-printing

 }}}

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


More information about the ghc-tickets mailing list