hi again, i'm currently trying to address issue 2 in ticket #1617, that :browse lists names either qualified or unqualified, not both. given that import statements need not list imported names explicitly, that means ghci users cannot see where unqualified names come from.
since every unqualified name is available qualified as well,it would be a bit tedious to list each of them twice. so, in implementing :browse! (current diff attached), i'm aiming for a compromise:
- still only list each name once, either qualified or unqualified
- indicate possible qualifiers by listing import modules
for groups of names, as comments
the problem is that i don't know how to get the "import name",
the name of the module from which a name has been imported.
i'm currently using
moduleNameString . moduleName . nameModule . getNamebut that seems to refer to the definition module, which can differ from the import module. in particular, using the definition module
qualifier to qualify an unqualified name will not work, in general.example: without explicit imports, i get "GHC.Float" for "pi", but "GHC.Float.pi" isn't in scope - "Prelude.pi" is.
how can i get the correct in-scope qualifier for a Name? claus
http://hackage.haskell.org/trac/ghc/ticket/1617
ghci-browse.diff
Description: Binary data
_______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
