Move DFunUnfolding generation to TcInstDcls
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 23 Mar 2016 15:37:50 +0000 (15:37 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 23 Mar 2016 15:39:13 +0000 (15:39 +0000)
commitdb9e4eb4e3fe916df7a69da1b211083ad6068aff
tree52f1d9bcdbdee5dbfb19e053e435a905b42983a6
parent7d5ff3d36946d99ba4691344e04dd0328b2c1ef2
Move DFunUnfolding generation to TcInstDcls

The desugarer had a fragile case to generate the Unfolding for a
DFun. This patch moves the unfolding generation to TcInstDcls, where
all the pieces are to hand.

Fixes Trac #11742
compiler/deSugar/DsBinds.hs
compiler/typecheck/TcInstDcls.hs
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/simplCore/should_compile/T11742.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T