Have addModFinalizer expose the local type environment.

Authored by facundominguez on Jul 6 2016, 4:48 AM.

Description

Have addModFinalizer expose the local type environment.

Summary:
This annotates the splice point with 'HsSpliced ref e' where 'e' is the
result of the splice. 'ref' is a reference that the typechecker will fill with
the local type environment.

The finalizer then reads the ref and uses the local type environment, which
causes 'reify' to find local variables when run in the finalizer.

Test Plan: ./validate

Reviewers: simonpj, simonmar, bgamari, austin, goldfire

Reviewed By: goldfire

Subscribers: simonmar, thomie, mboes

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

GHC Trac Issues: Trac #11832

(cherry picked from commit 567dbd9bcb602accf3184b83050f2982cbb7758b)

Details

Committed
bgamariAug 30 2016, 4:43 PM
Reviewer
goldfire
Differential Revision
D2286: Have addModFinalizer expose the local type environment.
Parents
rGHCa8d0d3eb1e97: Testsuite: for tests that use TH, omit *all* prof_ways
Branches
Unknown
Tags
Unknown