Buglet in reporting out of scope errors in rules
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 20 Sep 2018 18:53:56 +0000 (19:53 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Sun, 23 Sep 2018 01:45:23 +0000 (02:45 +0100)
commitcad5d0b69bc039b635a6eb0e5c9ed47d7c5a38ed
treee245f11c6cb56e4422a9e0875ceacd93c3ef4096
parent7e77f41430ae1cad84d5b0c90328331d38f3eda0
Buglet in reporting out of scope errors in rules

Most out of scope errors get reported by the type checker these
days, but not all.  Example, the function on the LHS of a RULE.

Trace #15659 pointed out that this less-heavily-used code path
produce a "wacky" error message.  Indeed so.  Easily fixed.
compiler/hsSyn/HsExpr.hs
compiler/rename/RnSource.hs
compiler/rename/RnUnbound.hs
testsuite/tests/rename/should_fail/T15659.hs [new file with mode: 0644]
testsuite/tests/rename/should_fail/T15659.stderr [new file with mode: 0644]
testsuite/tests/rename/should_fail/all.T