From bf3b29323d69b2c6f073885fb896dd4a5c346c02 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Wed, 6 Nov 2013 16:21:05 +0000 Subject: Tidy up the error messages we get from TH in stage1 (Trac #8312) Instead of panic-ing we now give a sensible message. There is quite a bit of refactoring here too, removing several #ifdef GHCI things --- compiler/rename/RnExpr.lhs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'compiler/rename/RnExpr.lhs') diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs index cb36b9055a..32e0a47193 100644 --- a/compiler/rename/RnExpr.lhs +++ b/compiler/rename/RnExpr.lhs @@ -16,9 +16,7 @@ module RnExpr ( #include "HsVersions.h" -#ifdef GHCI import {-# SOURCE #-} TcSplice( runQuasiQuoteExpr ) -#endif /* GHCI */ import RnBinds ( rnLocalBindsAndThen, rnLocalValBindsLHS, rnLocalValBindsRHS, rnMatchGroup, rnGRHS, makeMiniFixityEnv) @@ -179,15 +177,12 @@ rnExpr e@(HsBracket br_body) = rnBracket e br_body rnExpr (HsSpliceE splice) = rnSpliceExpr splice -#ifndef GHCI -rnExpr e@(HsQuasiQuoteE _) = pprPanic "Cant do quasiquotation without GHCi" (ppr e) -#else + rnExpr (HsQuasiQuoteE qq) = 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 */ --------------------------------------------- -- Sections -- cgit v1.2.1