[GHC] #15269: Qualified Names in --show-iface output

GHC ghc-devs at haskell.org
Fri Jun 15 14:39:28 UTC 2018


#15269: Qualified Names in --show-iface output
-------------------------------------+-------------------------------------
        Reporter:  sjakobi           |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by sjakobi):

 `--show-iface` is implemented in `showIface` and uses `defaultDumpStyle
 dflags`, which in turn uses `neverQualify`:

 {{{
 defaultDumpStyle :: DynFlags -> PprStyle
  -- Print without qualifiers to reduce verbosity, unless -dppr-debug
 defaultDumpStyle dflags
    | hasPprDebug dflags = PprDebug
    | otherwise          = PprDump neverQualify
 }}}

 I think I'll try to make a custom `PrintUnqualified` style that qualifies
 (with module names) any names that are not defined in the current module,
 and apply this style to the entire `--show-iface` output.

 Does this sound like a good idea?

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15269#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list