Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
cf997f80
Commit
cf997f80
authored
Apr 26, 2007
by
Simon Marlow
Browse files
getRdrNamesInScope: return interactively-bound names too
so completion can now complete names of local bindings
parent
095be20c
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/main/GHC.hs
View file @
cf997f80
...
...
@@ -2037,8 +2037,15 @@ getNamesInScope s = withSession s $ \hsc_env -> do
getRdrNamesInScope
::
Session
->
IO
[
RdrName
]
getRdrNamesInScope
s
=
withSession
s
$
\
hsc_env
->
do
let
env
=
ic_rn_gbl_env
(
hsc_IC
hsc_env
)
return
(
concat
(
map
greToRdrNames
(
globalRdrEnvElts
env
)))
let
ic
=
hsc_IC
hsc_env
gbl_rdrenv
=
ic_rn_gbl_env
ic
ids
=
typeEnvIds
(
ic_type_env
ic
)
gbl_names
=
concat
(
map
greToRdrNames
(
globalRdrEnvElts
gbl_rdrenv
))
lcl_names
=
map
(
mkRdrUnqual
.
nameOccName
.
idName
)
ids
--
return
(
gbl_names
++
lcl_names
)
-- ToDo: move to RdrName
greToRdrNames
::
GlobalRdrElt
->
[
RdrName
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment