Add derived shadows only for Wanted constraints
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 12 Oct 2016 11:02:04 +0000 (12:02 +0100)
committerBen Gamari <ben@smart-cactus.org>
Wed, 12 Oct 2016 15:57:29 +0000 (11:57 -0400)
commitfefc53011e6d961c4dd8d61386bbdd36fc83f6d0
tree9471dd973e70be04b788ecd0e0e8df1f0325e5d7
parent47ae01bfb7ca426188d85c6ecb33ebbacc837aa6
Add derived shadows only for Wanted constraints

This patch implements choice (3) of comment:14 on Trac #12660.
It cures an infinite loop (caused by the creation of an infinite
type) in in compiling the 'singletons' package.

See Note [Add derived shadows only for Wanteds] in TcSMonad.

(cherry picked from commit 8fa5f5b197542b6e7e9e570991a1488204e606c9)
compiler/typecheck/TcSMonad.hs