Strip casts in checkValidInstHead
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 20 Jan 2016 16:04:20 +0000 (16:04 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 21 Jan 2016 10:09:43 +0000 (10:09 +0000)
commitb2e6350fb23403f1c88c5cfed5270d78dbdb6573
tree28cbcce27fda6443343c1ced2067e35e2ea53243
parent07afe448c3a83d7239054baf9d54681ca19766b0
Strip casts in checkValidInstHead

This patch addresses Trac #11464.

The fix is a bit crude (traverse the type to remove CastTys),
but it's also simple.

See Note [Casts during validity checking] in TcValidity
compiler/typecheck/TcType.hs
compiler/typecheck/TcValidity.hs
testsuite/tests/typecheck/should_fail/T11464.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T11464.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T