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

Fix #7918

parent 1957fddb
...@@ -189,8 +189,10 @@ rnExpr (HsSpliceE splice) ...@@ -189,8 +189,10 @@ rnExpr (HsSpliceE splice)
rnExpr e@(HsQuasiQuoteE _) = pprPanic "Cant do quasiquotation without GHCi" (ppr e) rnExpr e@(HsQuasiQuoteE _) = pprPanic "Cant do quasiquotation without GHCi" (ppr e)
#else #else
rnExpr (HsQuasiQuoteE qq) rnExpr (HsQuasiQuoteE qq)
= runQuasiQuoteExpr qq `thenM` \ (L _ expr') -> = runQuasiQuoteExpr qq `thenM` \ lexpr' ->
rnExpr expr' -- 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 */ #endif /* GHCI */
--------------------------------------------- ---------------------------------------------
......
...@@ -416,8 +416,9 @@ rnPatAndThen _ p@(QuasiQuotePat {}) ...@@ -416,8 +416,9 @@ rnPatAndThen _ p@(QuasiQuotePat {})
#else #else
rnPatAndThen mk (QuasiQuotePat qq) rnPatAndThen mk (QuasiQuotePat qq)
= do { pat <- liftCps $ runQuasiQuotePat qq = do { pat <- liftCps $ runQuasiQuotePat qq
; L _ pat' <- rnLPatAndThen mk pat -- Wrap the result of the quasi-quoter in parens so that we don't
; return pat' } -- lose the outermost location set by runQuasiQuote (#7918)
; rnPatAndThen mk (ParPat pat) }
#endif /* GHCI */ #endif /* GHCI */
rnPatAndThen _ pat = pprPanic "rnLPatAndThen" (ppr pat) rnPatAndThen _ pat = pprPanic "rnLPatAndThen" (ppr pat)
......
...@@ -269,7 +269,9 @@ rnHsTyKi _ _ ty@(HsQuasiQuoteTy _) = pprPanic "Can't do quasiquotation without G ...@@ -269,7 +269,9 @@ rnHsTyKi _ _ ty@(HsQuasiQuoteTy _) = pprPanic "Can't do quasiquotation without G
rnHsTyKi isType doc (HsQuasiQuoteTy qq) rnHsTyKi isType doc (HsQuasiQuoteTy qq)
= ASSERT( isType ) = ASSERT( isType )
do { ty <- runQuasiQuoteType qq 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 #endif
rnHsTyKi isType _ (HsCoreTy ty) 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