Qualified Names in --show-iface output
Motivation
In the Hi Haddock project we use tests based on the --show-iface
mode.
In the .hi
-files we dump, we list the Name
s that may correspond to an identifier found in a docstring. In the case of ambiguous identifiers, it would be nice to see the module names of the corresponding Name
s, so we can tell them apart.
For example, for a module containing a docstring "'elem'"
and a declaration for elem
, we would currently see:
"elem":
elem
elem
One elem
refers to the local one, the other to the one in the Prelude
.
What I'd like to see instead is
"elem":
Data.Foldable.elem
MyModule.elem
If the output would also contain package names and/or ids, I wouldn't mind.
Possible solutions
- In D4806, I proposed to hardcode qualification for
--show-iface
. But this may create unwanted noise in different usecases. - If I could use
-dppr-debug
with--show-iface
I would do that. Currently I get the following error if try:
Warning: the following files would be used as linker inputs, but linking is not being done: NoExportList.hi -dppr-debug: openBinaryFile: does not exist (No such file or directory)