[commit: ghc] master: GHCi: Include a note in the hint to expose a hidden package (30c887d)
git at git.haskell.org
git at git.haskell.org
Mon May 14 02:51:43 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/30c887d3b176a36b7affc27b118e0450d115df0c/ghc
>---------------------------------------------------------------
commit 30c887d3b176a36b7affc27b118e0450d115df0c
Author: Chaitanya Koparkar <ckoparkar at gmail.com>
Date: Sun May 13 18:35:18 2018 -0400
GHCi: Include a note in the hint to expose a hidden package
Test Plan: validate
Reviewers: bgamari, RyanGlScott, osa1
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15055
Differential Revision: https://phabricator.haskell.org/D4669
>---------------------------------------------------------------
30c887d3b176a36b7affc27b118e0450d115df0c
compiler/main/Finder.hs | 3 ++-
testsuite/tests/ghci/should_fail/T15055.stderr | 1 +
testsuite/tests/package/package01e.stderr | 2 ++
testsuite/tests/package/package06e.stderr | 2 ++
testsuite/tests/package/package07e.stderr | 3 +++
testsuite/tests/package/package08e.stderr | 3 +++
testsuite/tests/plugins/T11244.stderr | 1 +
7 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/compiler/main/Finder.hs b/compiler/main/Finder.hs
index 9568ac1..613c0a4 100644
--- a/compiler/main/Finder.hs
+++ b/compiler/main/Finder.hs
@@ -678,7 +678,8 @@ cantFindErr cannot_find _ dflags mod_name find_result
= let pkg = expectJust "pkg_hidden" (lookupPackage dflags pkgid)
in text "You can run" <+>
quotes (text ":set -package " <> ppr (packageName pkg)) <+>
- text "to expose it."
+ text "to expose it." $$
+ text "(Note: this unloads all the modules in the current scope.)"
mod_hidden pkg =
text "it is a hidden module in the package" <+> quotes (ppr pkg)
diff --git a/testsuite/tests/ghci/should_fail/T15055.stderr b/testsuite/tests/ghci/should_fail/T15055.stderr
index dcc297c..daba7c7 100644
--- a/testsuite/tests/ghci/should_fail/T15055.stderr
+++ b/testsuite/tests/ghci/should_fail/T15055.stderr
@@ -3,3 +3,4 @@
Could not find module ‘GHC’
It is a member of the hidden package ‘ghc-8.5’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
diff --git a/testsuite/tests/package/package01e.stderr b/testsuite/tests/package/package01e.stderr
index a755991..e4af6b1 100644
--- a/testsuite/tests/package/package01e.stderr
+++ b/testsuite/tests/package/package01e.stderr
@@ -3,10 +3,12 @@ package01e.hs:2:1: error:
Could not find module ‘Data.Map’
It is a member of the hidden package ‘containers-0.5.11.0’.
You can run ‘:set -package containers’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
package01e.hs:3:1: error:
Could not find module ‘Data.IntMap’
It is a member of the hidden package ‘containers-0.5.11.0’.
You can run ‘:set -package containers’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/package/package06e.stderr b/testsuite/tests/package/package06e.stderr
index 59aeb37..1bdbb16 100644
--- a/testsuite/tests/package/package06e.stderr
+++ b/testsuite/tests/package/package06e.stderr
@@ -3,10 +3,12 @@ package06e.hs:2:1: error:
Could not find module ‘HsTypes’
It is a member of the hidden package ‘ghc-8.1’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
package06e.hs:3:1: error:
Could not find module ‘UniqFM’
It is a member of the hidden package ‘ghc-8.1’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/package/package07e.stderr b/testsuite/tests/package/package07e.stderr
index d167508..9bd53da 100644
--- a/testsuite/tests/package/package07e.stderr
+++ b/testsuite/tests/package/package07e.stderr
@@ -8,16 +8,19 @@ package07e.hs:3:1: error:
Could not find module ‘HsTypes’
It is a member of the hidden package ‘ghc-8.5’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
package07e.hs:4:1: error:
Could not find module ‘HsUtils’
It is a member of the hidden package ‘ghc-8.5’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
package07e.hs:5:1: error:
Could not find module ‘UniqFM’
It is a member of the hidden package ‘ghc-8.5’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/package/package08e.stderr b/testsuite/tests/package/package08e.stderr
index 922c643..0e075dd 100644
--- a/testsuite/tests/package/package08e.stderr
+++ b/testsuite/tests/package/package08e.stderr
@@ -8,16 +8,19 @@ package08e.hs:3:1: error:
Could not find module ‘HsTypes’
It is a member of the hidden package ‘ghc-8.5’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
package08e.hs:4:1: error:
Could not find module ‘HsUtils’
It is a member of the hidden package ‘ghc-8.5’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
package08e.hs:5:1: error:
Could not find module ‘UniqFM’
It is a member of the hidden package ‘ghc-8.5’.
You can run ‘:set -package ghc’ to expose it.
+ (Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/plugins/T11244.stderr b/testsuite/tests/plugins/T11244.stderr
index 472ef44..b571144 100644
--- a/testsuite/tests/plugins/T11244.stderr
+++ b/testsuite/tests/plugins/T11244.stderr
@@ -1,4 +1,5 @@
<command line>: Could not find module ‘RuleDefiningPlugin’
It is a member of the hidden package ‘rule-defining-plugin-0.1’.
You can run ‘:set -package rule-defining-plugin’ to expose it.
+(Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
More information about the ghc-commits
mailing list