summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorSimon Jakobi <simon.jakobi@gmail.com>2018-08-12 11:10:39 +0200
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-08-12 11:10:40 +0200
commitd42eef344a71990d12f27e88cdf10ba0b2a2f34b (patch)
treec38cdb9ba3ff00e86480d92e80ecdc59d2b0de1f /compiler/utils
parent193eeee6bdbd5b2ec38e26c70e8aa79ce7bd2f99 (diff)
downloadhaskell-d42eef344a71990d12f27e88cdf10ba0b2a2f34b.tar.gz
--show-iface: Qualify all non-local names
Summary: In order to disambiguate names from different modules, qualify all names that don't originate in the current module. Also update docs for QueryQualifyName Test Plan: validate Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, thomie, carter, tdammers GHC Trac Issues: #15269 Differential Revision: https://phabricator.haskell.org/D4852
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Outputable.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index 4df9adfe84..929c7f3d58 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -181,12 +181,8 @@ data PrintUnqualified = QueryQualify {
queryQualifyPackage :: QueryQualifyPackage
}
--- | given an /original/ name, this function tells you which module
--- name it should be qualified with when printing for the user, if
--- any. For example, given @Control.Exception.catch@, which is in scope
--- as @Exception.catch@, this function will return @Just "Exception"@.
--- Note that the return value is a ModuleName, not a Module, because
--- in source code, names are qualified by ModuleNames.
+-- | Given a `Name`'s `Module` and `OccName`, decide whether and how to qualify
+-- it.
type QueryQualifyName = Module -> OccName -> QualifyName
-- | For a given module, we need to know whether to print it with