Have reify work for local variables with functional dependencies.
authorFacundo Domínguez <facundo.dominguez@tweag.io>
Thu, 17 Nov 2016 15:04:13 +0000 (10:04 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 17 Nov 2016 16:04:02 +0000 (11:04 -0500)
commit231a3ae1644403c1f295e993105c4346d0db22db
treef73103b98db11d69ea57a740aa08f4c93314246a
parent04b024a9dc5c001e3e9ee97fc999a443a492fb84
Have reify work for local variables with functional dependencies.

It turned out that finalizers were run too early and information
resulting from simplifying constraints was not available.

This patch runs finalizers after a first call to simplifyTop, and
then calls simplifyTop a second time to deal with constraints
that could result from running the finalizers.

Fixes T12777

Test Plan: ./validate

Reviewers: goldfire, simonpj, bgamari, austin

Reviewed By: simonpj

Subscribers: mpickering, mboes, thomie

Differential Revision: https://phabricator.haskell.org/D2659

GHC Trac Issues: #12777
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnMonad.hs
compiler/typecheck/TcRnTypes.hs
testsuite/tests/th/TH_reifyLocalDefs2.hs [new file with mode: 0644]
testsuite/tests/th/TH_reifyLocalDefs2.stderr [new file with mode: 0644]
testsuite/tests/th/all.T