diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-07-11 13:59:07 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-07-11 14:34:09 -0400 |
commit | ba46e63f3d6f7d0438a0262f6711f8a219c703bc (patch) | |
tree | 8ccb4f26558567381ef3355d9f4073f5aba9a16e /testsuite/tests/module | |
parent | ea751248d80efe7633a31120da56e9a31b6820ff (diff) | |
download | haskell-ba46e63f3d6f7d0438a0262f6711f8a219c703bc.tar.gz |
Fix #13948 by being pickier about when to suggest DataKinds
Commit 343cb32d0983f576d344a2d04a35c3fd6eecf2c5 (#13568) made GHC a bit
too cavalier in suggesting when data constructors are in scope (and
suggesting the use of `DataKinds`). This tones down the suggestions so
that `DataKinds` is only suggested if a data constructor of that name is
actually in scope (previously, it would always suggest, even if it was
out of scope).
Fixes #13948.
Test Plan: ./validate
Reviewers: mpickering, austin, bgamari
Reviewed By: mpickering
Subscribers: rwbarton, thomie
GHC Trac Issues: #13948
Differential Revision: https://phabricator.haskell.org/D3719
Diffstat (limited to 'testsuite/tests/module')
-rw-r--r-- | testsuite/tests/module/mod122.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/module/mod123.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/module/mod124.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/module/mod127.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/module/mod29.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/module/mod50.stderr | 4 |
6 files changed, 3 insertions, 12 deletions
diff --git a/testsuite/tests/module/mod122.stderr b/testsuite/tests/module/mod122.stderr index 66aaaf2304..51338f0a06 100644 --- a/testsuite/tests/module/mod122.stderr +++ b/testsuite/tests/module/mod122.stderr @@ -1,4 +1,2 @@ -mod122.hs:5:6: error: - Not in scope: type constructor or class ‘C’ - A data constructor of that name is in scope; did you mean DataKinds? +mod122.hs:5:6: error: Not in scope: type constructor or class ‘C’ diff --git a/testsuite/tests/module/mod123.stderr b/testsuite/tests/module/mod123.stderr index 38390d05d1..c31f6d5a39 100644 --- a/testsuite/tests/module/mod123.stderr +++ b/testsuite/tests/module/mod123.stderr @@ -1,4 +1,2 @@ -mod123.hs:5:6: error: - Not in scope: type constructor or class ‘T’ - A data constructor of that name is in scope; did you mean DataKinds? +mod123.hs:5:6: error: Not in scope: type constructor or class ‘T’ diff --git a/testsuite/tests/module/mod124.stderr b/testsuite/tests/module/mod124.stderr index cbf9f4558e..a052a506ad 100644 --- a/testsuite/tests/module/mod124.stderr +++ b/testsuite/tests/module/mod124.stderr @@ -1,6 +1,5 @@ mod124.hs:6:6: error: Not in scope: type constructor or class ‘T’ - A data constructor of that name is in scope; did you mean DataKinds? Perhaps you want to remove ‘T’ from the explicit hiding list in the import of ‘Mod124_A’ (mod124.hs:4:1-26). diff --git a/testsuite/tests/module/mod127.stderr b/testsuite/tests/module/mod127.stderr index 462ebbccaf..861d492d1a 100644 --- a/testsuite/tests/module/mod127.stderr +++ b/testsuite/tests/module/mod127.stderr @@ -1,6 +1,5 @@ mod127.hs:6:6: error: Not in scope: type constructor or class ‘T’ - A data constructor of that name is in scope; did you mean DataKinds? Perhaps you want to remove ‘T’ from the explicit hiding list in the import of ‘Mod127_A’ (mod127.hs:4:1-26). diff --git a/testsuite/tests/module/mod29.stderr b/testsuite/tests/module/mod29.stderr index 08a019e13d..e70c5df83d 100644 --- a/testsuite/tests/module/mod29.stderr +++ b/testsuite/tests/module/mod29.stderr @@ -1,6 +1,5 @@ mod29.hs:6:12: error: Not in scope: type constructor or class ‘Char’ - A data constructor of that name is in scope; did you mean DataKinds? Perhaps you want to add ‘Char’ to the import list in the import of ‘Prelude’ (mod29.hs:5:1-19). diff --git a/testsuite/tests/module/mod50.stderr b/testsuite/tests/module/mod50.stderr index 94878a8faa..9669427f8f 100644 --- a/testsuite/tests/module/mod50.stderr +++ b/testsuite/tests/module/mod50.stderr @@ -1,4 +1,2 @@ -mod50.hs:3:22: error: - Not in scope: type constructor or class ‘Foo’ - A data constructor of that name is in scope; did you mean DataKinds? +mod50.hs:3:22: error: Not in scope: type constructor or class ‘Foo’ |