Emit wild-card constraints in the right place
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 9 May 2016 10:49:15 +0000 (11:49 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 10 May 2016 08:34:21 +0000 (09:34 +0100)
commit76d9156f6446d87e0f859a44959d63c2067fc805
tree8a2c6291ee2cf04c19c0021d4534d843000c04e3
parent2593e20416c2e4222ed33c6f363c0341f44a120a
Emit wild-card constraints in the right place

We were failing to emit wild-card hole constraints altogether
in the case of pattern bindings.  Reason: it was done in
tcExtendTyVarEnvFromSig, which isn't called for pattern bindings.

This patch make it work right for both pattern and function
bindings.  Mainly, there is a call to emitWildCardHolds in
tcRhs for both PatBind and FunBind.

I also killed off TcExpr.typeSigCtxt.
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcExpr.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcType.hs