Improved error message about exported type operators.
There is ambiguty between (1) type constructors and (2) data constructors in export lists, e.g. '%%' can stand for both of them. This ambiguity is resolved in favor of (2). If the exported data constructor is not in scope, but type constructor with the same name is in scope, GHC should suggest adding 'type' keyword to resolve ambiguity in favor of (1) and enabling 'TypeOperators' extension. The patch only extends the error message. See Trac #11432. Test Plan: `make test` Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: mpickering, thomie, goldfire, kosmikus Differential Revision: https://phabricator.haskell.org/D1902 GHC Trac Issues: #11432
Showing
- compiler/rename/RnEnv.hs 22 additions, 1 deletioncompiler/rename/RnEnv.hs
- compiler/rename/RnNames.hs 2 additions, 2 deletionscompiler/rename/RnNames.hs
- testsuite/tests/module/T11432.hs 9 additions, 0 deletionstestsuite/tests/module/T11432.hs
- testsuite/tests/module/T11432.stderr 10 additions, 0 deletionstestsuite/tests/module/T11432.stderr
- testsuite/tests/module/all.T 1 addition, 0 deletionstestsuite/tests/module/all.T
- testsuite/tests/module/mod89.stderr 10 additions, 10 deletionstestsuite/tests/module/mod89.stderr
Loading
Please register or sign in to comment