[GHC] #10579: full module names of names not in scope have gone missing in ghci
#10579: full module names of names not in scope have gone missing in ghci -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Compare {{{ rwbarton@morphism:/tmp$ ghci-7.10.1 GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help Prelude> :t GHC.Read.readPrec GHC.Read.readPrec :: Read a => Text.ParserCombinators.ReadPrec.ReadPrec a }}} with {{{ rwbarton@morphism:/tmp$ ~/ghc/inplace/bin/ghc-stage2 --interactive GHCi, version 7.11.20150624: http://www.haskell.org/ghc/ :? for help Prelude> :t GHC.Read.readPrec GHC.Read.readPrec :: Read a => ReadPrec a }}} The `Text.ParserCombinators.ReadPrec.` bit can be quite helpful, was it suppressed intentionally? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10579> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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@microsoft.com> Tue Apr 7 05:48:30 2015 Committer: Simon Peyton Jones <simonpj@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
#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: -------------------------------------+------------------------------------- Comment (by simonpj): Correct. I'm not sure what the "right" solution is here. Printing qualifiers on everything in `base` is painful. But not printing them is also painful. Any suggestions? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10579#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10579: full module names of names not in scope have gone missing in ghci -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: simonpj Type: bug | Status: closed Priority: normal | Milestone: Component: GHCi | Version: 7.11 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11208 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => duplicate * related: => #11208 Comment: Fixed in #11208. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10579#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10579: full module names of names not in scope have gone missing in ghci -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: simonpj Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: GHCi | Version: 7.11 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #11208 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * milestone: => 8.0.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10579#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC