summaryrefslogtreecommitdiff
path: root/compiler/deSugar
diff options
context:
space:
mode:
authorFacundo Domínguez <facundo.dominguez@tweag.io>2016-07-06 06:48:27 -0300
committerFacundo Domínguez <facundo.dominguez@tweag.io>2016-07-06 06:48:27 -0300
commit567dbd9bcb602accf3184b83050f2982cbb7758b (patch)
treec7b9930fe4d21db8b38e17edbde9a05dd472de26 /compiler/deSugar
parentf560a03ccdb246083fe64da3507c5be4c40960fe (diff)
downloadhaskell-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 'compiler/deSugar')
-rw-r--r--compiler/deSugar/DsMeta.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs
index 8dd8b48488..01c4903c54 100644
--- a/compiler/deSugar/DsMeta.hs
+++ b/compiler/deSugar/DsMeta.hs
@@ -1071,6 +1071,7 @@ repSplice :: HsSplice Name -> DsM (Core a)
repSplice (HsTypedSplice n _) = rep_splice n
repSplice (HsUntypedSplice n _) = rep_splice n
repSplice (HsQuasiQuote n _ _ _) = rep_splice n
+repSplice e@(HsSpliced _ _) = pprPanic "repSplice" (ppr e)
rep_splice :: Name -> DsM (Core a)
rep_splice splice_name