import {-# SOURCE #-} TyCon ( TyCon, setTyConName )
import OccName -- All of it
+import Module
import RdrName ( RdrName, mkRdrQual, mkRdrUnqual )
import CmdLineOpts ( opt_PprStyle_NoPrags, opt_OmitInterfacePragmas, opt_EnsureSplittableC )
nameUnique name = n_uniq name
nameOccName name = n_occ name
-nameModule name = nameSortModule (n_sort name)
+nameModule name =
+ case n_sort name of
+ Local -> pprPanic "nameModule" (ppr name)
+ x -> nameSortModule x
nameSortModule (Global mod) = mod
nameSortModule (WiredInId mod _) = mod
pp_mod_dot sty
= case prov of
- SystemProv -> pp_qual mod dot user_sty
- -- Hack alert! Omit the qualifier on SystemProv things, which I claim
- -- will also be WiredIn things. We can't get the omit flag right
+ SystemProv -> pp_qual mod pp_sep user_sty
+ -- Hack alert! Omit the qualifier on SystemProv things in user style
+ -- I claim such SystemProv things will also be WiredIn things.
+ -- We can't get the omit flag right
-- on wired in tycons etc (sigh) so we just leave it out in user style,
-- and hope that leaving it out isn't too consfusing.
-- (e.g. if the programmer hides Bool and redefines it. If so, use -dppr-debug.)