diff options
author | Facundo DomÃnguez <facundo.dominguez@tweag.io> | 2016-07-06 06:48:27 -0300 |
---|---|---|
committer | Facundo DomÃnguez <facundo.dominguez@tweag.io> | 2016-07-06 06:48:27 -0300 |
commit | 567dbd9bcb602accf3184b83050f2982cbb7758b (patch) | |
tree | c7b9930fe4d21db8b38e17edbde9a05dd472de26 /iserv | |
parent | f560a03ccdb246083fe64da3507c5be4c40960fe (diff) | |
download | haskell-567dbd9bcb602accf3184b83050f2982cbb7758b.tar.gz |
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: #11832
Diffstat (limited to 'iserv')
-rw-r--r-- | iserv/src/Main.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/iserv/src/Main.hs b/iserv/src/Main.hs index 3fcd49f5c7..66e15c9785 100644 --- a/iserv/src/Main.hs +++ b/iserv/src/Main.hs @@ -53,7 +53,7 @@ serv verbose pipe@Pipe{..} restore = loop case msg of Shutdown -> return () RunTH st q ty loc -> wrapRunTH $ runTH pipe st q ty loc - FinishTH st -> wrapRunTH $ finishTH pipe st + RunModFinalizers st qrefs -> wrapRunTH $ runModFinalizerRefs pipe st qrefs _other -> run msg >>= reply reply :: forall a. (Binary a, Show a) => a -> IO () |