summaryrefslogtreecommitdiff
path: root/compiler/rename/RnExpr.lhs
diff options
context:
space:
mode:
authorEdsko de Vries <edsko@well-typed.com>2013-09-03 12:51:10 +0100
committerEdsko de Vries <edsko@well-typed.com>2013-09-03 14:29:40 +0100
commitbe7f10bb9486462247edb6aae9a3e5f46cfe4908 (patch)
tree4f0640de17831da207aaae6f2edaeb6d3508d482 /compiler/rename/RnExpr.lhs
parent1957fddb9c32e4de001374baad55d9ccf76428f9 (diff)
downloadhaskell-be7f10bb9486462247edb6aae9a3e5f46cfe4908.tar.gz
Fix #7918
Diffstat (limited to 'compiler/rename/RnExpr.lhs')
-rw-r--r--compiler/rename/RnExpr.lhs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs
index 0ef169085b..23501e3e1a 100644
--- a/compiler/rename/RnExpr.lhs
+++ b/compiler/rename/RnExpr.lhs
@@ -189,8 +189,10 @@ rnExpr (HsSpliceE splice)
rnExpr e@(HsQuasiQuoteE _) = pprPanic "Cant do quasiquotation without GHCi" (ppr e)
#else
rnExpr (HsQuasiQuoteE qq)
- = runQuasiQuoteExpr qq `thenM` \ (L _ expr') ->
- rnExpr expr'
+ = runQuasiQuoteExpr qq `thenM` \ lexpr' ->
+ -- Wrap the result of the quasi-quoter in parens so that we don't
+ -- lose the outermost location set by runQuasiQuote (#7918)
+ rnExpr (HsPar lexpr')
#endif /* GHCI */
---------------------------------------------