diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2015-11-10 17:07:10 +0100 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2015-11-13 10:13:20 +0100 |
commit | e66f79dfb22031dd3f75dd3eb341e8269ab51d83 (patch) | |
tree | 157fdd402b439ac8c82439d37d02084b4e899fd9 /testsuite/tests/ghci | |
parent | 2290c8bd8c3faee0cb7dc1c2c7951bb9d5e3ebf9 (diff) | |
download | haskell-e66f79dfb22031dd3f75dd3eb341e8269ab51d83.tar.gz |
Give helpful advice when a fully qualified name is not in scope
This implements #11071. It needs to thread through a GlobalRdrEnv
corresponding to the export list of the module if its exports were not
restricted.
A refactoring of ImportedModsVal into a proper data type follows.
Differential Revision: https://phabricator.haskell.org/D1462
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r-- | testsuite/tests/ghci/scripts/T2452.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8639.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci036.stderr | 34 |
3 files changed, 23 insertions, 18 deletions
diff --git a/testsuite/tests/ghci/scripts/T2452.stderr b/testsuite/tests/ghci/scripts/T2452.stderr index 68e07ae367..663742f67c 100644 --- a/testsuite/tests/ghci/scripts/T2452.stderr +++ b/testsuite/tests/ghci/scripts/T2452.stderr @@ -1,2 +1,4 @@ -<interactive>:1:1: Not in scope: ‘System.IO.hPutStrLn’ +<interactive>:1:1: error: + Not in scope: ‘System.IO.hPutStrLn’ + No module named ‘System.IO’ is imported. diff --git a/testsuite/tests/ghci/scripts/T8639.stderr b/testsuite/tests/ghci/scripts/T8639.stderr index 2c63d731b1..ee06e6e70c 100644 --- a/testsuite/tests/ghci/scripts/T8639.stderr +++ b/testsuite/tests/ghci/scripts/T8639.stderr @@ -1,4 +1,5 @@ -<interactive>:1:1: +<interactive>:1:1: error: Not in scope: ‘H.bit’ Perhaps you meant ‘Q.bit’ (imported from T8639) + No module named ‘H’ is imported. diff --git a/testsuite/tests/ghci/scripts/ghci036.stderr b/testsuite/tests/ghci/scripts/ghci036.stderr index 0c7de1356b..5b44b562a7 100644 --- a/testsuite/tests/ghci/scripts/ghci036.stderr +++ b/testsuite/tests/ghci/scripts/ghci036.stderr @@ -1,16 +1,18 @@ -
-<interactive>:1:1: error: Variable not in scope: nubBy
-
-<interactive>:1:1: error: Variable not in scope: nub
-
-<interactive>:1:1: error: Variable not in scope: nubBy
-
-<interactive>:1:1: error: Variable not in scope: nub
-
-<interactive>:1:1: error:
- Variable not in scope: nub
- Perhaps you meant ‘L.nub’ (imported from Data.List)
-
-<interactive>:1:1: error: Not in scope: ‘L.nub’
-
-<interactive>:1:1: error: Variable not in scope: nub
+ +<interactive>:1:1: error: Variable not in scope: nubBy + +<interactive>:1:1: error: Variable not in scope: nub + +<interactive>:1:1: error: Variable not in scope: nubBy + +<interactive>:1:1: error: Variable not in scope: nub + +<interactive>:1:1: error: + Variable not in scope: nub + Perhaps you meant ‘L.nub’ (imported from Data.List) + +<interactive>:1:1: error: + Not in scope: ‘L.nub’ + No module named ‘L’ is imported. + +<interactive>:1:1: error: Variable not in scope: nub |