summaryrefslogtreecommitdiff
path: root/compiler/utils/Outputable.lhs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2009-05-28 16:52:15 +0000
committersimonpj@microsoft.com <unknown>2009-05-28 16:52:15 +0000
commit30ced40470d0bb2a14a8eb25dd77ca99edd88a5a (patch)
tree84af3de0b75f7ee33c416385fd3ab92527924083 /compiler/utils/Outputable.lhs
parenta99906e5272be7c6212327a32c83eac0a9b08b4b (diff)
downloadhaskell-30ced40470d0bb2a14a8eb25dd77ca99edd88a5a.tar.gz
Improve printing of Orig RdrNames
In Tempate Haskell -ddump-splices, the "after" expression is populated with RdrNames, many of which are Orig things. We used to print these fully-qualified, but that's a bit heavy. This patch refactors the code a bit so that the same print-unqualified mechanism we use for Names also works for RdrNames. Lots of comments too, because it took me a while to figure out how it all worked again.
Diffstat (limited to 'compiler/utils/Outputable.lhs')
-rw-r--r--compiler/utils/Outputable.lhs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index 023d7d01d1..ed47609d10 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -129,6 +129,7 @@ data Depth = AllTheWay
-- in source code, names are qualified by ModuleNames.
type QueryQualifyName = Module -> OccName -> QualifyName
+-- See Note [Printing original names] in HscTypes
data QualifyName -- given P:M.T
= NameUnqual -- refer to it as "T"
| NameQual ModuleName -- refer to it as "X.T" for the supplied X