Commit be7f10bb authored by Edsko de Vries's avatar Edsko de Vries

Fix #7918

parent 1957fddb
......@@ -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 */
---------------------------------------------
......
......@@ -416,8 +416,9 @@ rnPatAndThen _ p@(QuasiQuotePat {})
#else
rnPatAndThen mk (QuasiQuotePat qq)
= do { pat <- liftCps $ runQuasiQuotePat qq
; L _ pat' <- rnLPatAndThen mk pat
; return pat' }
-- Wrap the result of the quasi-quoter in parens so that we don't
-- lose the outermost location set by runQuasiQuote (#7918)
; rnPatAndThen mk (ParPat pat) }
#endif /* GHCI */
rnPatAndThen _ pat = pprPanic "rnLPatAndThen" (ppr pat)
......
......@@ -269,7 +269,9 @@ rnHsTyKi _ _ ty@(HsQuasiQuoteTy _) = pprPanic "Can't do quasiquotation without G
rnHsTyKi isType doc (HsQuasiQuoteTy qq)
= ASSERT( isType )
do { ty <- runQuasiQuoteType qq
; rnHsType doc (unLoc ty) }
-- Wrap the result of the quasi-quoter in parens so that we don't
-- lose the outermost location set by runQuasiQuote (#7918)
; rnHsType doc (HsParTy ty) }
#endif
rnHsTyKi isType _ (HsCoreTy ty)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment