summaryrefslogtreecommitdiff
path: root/testsuite/tests/module/T12026.stderr
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2016-05-10 08:41:46 +0200
committerBen Gamari <ben@smart-cactus.org>2016-05-10 12:02:14 +0200
commit53f26f5a45f146e1cc988bbcf76a362c877beaa2 (patch)
tree3f7c270f496f90fe3683f1536bea7ec13dd3dd9d /testsuite/tests/module/T12026.stderr
parent3ca78062968f7ab6efff82122101e6f91b8c2cef (diff)
downloadhaskell-53f26f5a45f146e1cc988bbcf76a362c877beaa2.tar.gz
Forbid variables to be parents in import lists.
In the long discussion on #11432, it was decided that when a type constructor is parsed as a variable ((--.->) is one example) then in order to export the type constructor then the user should be required to use the ExplicitNamespaces keyword. This was implemented in quite an indirect manner in the renamer. It is much more direct to enforce this in the parser at the expense of slighty worse error messages. Further to this, the check in the renamer was actually slightly wrong. If the variable was in scope then no error was raised, this was causing panics, see #12026 for an example. Reviewers: austin, bgamari Subscribers: davean, skvadrik, thomie Differential Revision: https://phabricator.haskell.org/D2181 GHC Trac Issues: #12026
Diffstat (limited to 'testsuite/tests/module/T12026.stderr')
-rw-r--r--testsuite/tests/module/T12026.stderr4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/module/T12026.stderr b/testsuite/tests/module/T12026.stderr
new file mode 100644
index 0000000000..38d53d7049
--- /dev/null
+++ b/testsuite/tests/module/T12026.stderr
@@ -0,0 +1,4 @@
+
+T12026.hs:3:17: error:
+ Expecting a type constructor but found a variable.
+ If ‘map’ is a type constructor then enable ExplicitNamespaces and use the 'type' keyword.