Look inside implications in simplifyRule
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 31 Jan 2018 14:25:50 +0000 (14:25 +0000)
committerBen Gamari <ben@smart-cactus.org>
Thu, 1 Feb 2018 03:12:46 +0000 (22:12 -0500)
commitd3573e4ae63d6ae1ac0cd4bf5692a9bcd39ba733
tree5d686c4f4788e77731d675c7c37dbb96138304f6
parent77cdf60c8a68d2208cd8109d82b5f83b17bf0e91
Look inside implications in simplifyRule

Trac #14732 was a perpelexing bug in which -fdefer-typed-holes
caused a mysterious type error in a RULE.  This turned out to
be because we are more aggressive about creating implications
when deferring (see TcUnify.implicationNeeded), and the rule
mechanism hadn't caught up.

This fixes it.

(cherry picked from commit e9ae0cae9eb6a340473b339b5711ae76c6bdd045)
compiler/typecheck/TcRules.hs
testsuite/tests/typecheck/should_compile/T14732.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T