
#10576: REPL returns list of all imported names when operator completion requested -------------------------------------+------------------------------------- Reporter: Geraldus | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | completions complete command Type of failure: Incorrect result | operator at runtime | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9996 | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Description changed by Geraldus: Old description:
When querying completions for operators GHCi returns a list containing all imported names rather than suitable completions.
For example, if you simply start GHCi and run `:complete repl ">>"` command it will give you all names from base and Prelude. Then if you import something else, for example `:m +Data.Text`, the result of query will contain names from Data.Text also.
In case of projects (`cabal repl`) things are worst, because returned list contains all names imported project-wise and it could be really huge.
GHCi behaves similarly with following queries: :complete repl "(>>" :complete repl "Prelude.>>" :complete repl "Prelude.(>>"
I only tested this on OS X 10.9, GHC 7.8.4
New description: When querying completions for operators GHCi returns a list containing all imported names rather than suitable completions. For example, if you simply start GHCi and run `:complete repl ">>"` command it will give you all names from base and Prelude. Then if you import something else, for example `:m +Data.Text`, the result of query will contain names from Data.Text also. In case of projects (`cabal repl`) things are worst, because returned list contains all names imported project-wise and it could be really huge. GHCi behaves similarly with following queries: {{{ :complete repl "(>>" :complete repl "Prelude.>>" :complete repl "Prelude.(>>" }}} I only tested this on OS X 10.9, GHC 7.8.4 -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10576#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler