diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-11-06 16:21:05 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-11-06 16:21:05 +0000 |
commit | bf3b29323d69b2c6f073885fb896dd4a5c346c02 (patch) | |
tree | 510f1c4a46dd368985566226c7055c9738afa0b5 /compiler/rename/RnExpr.lhs | |
parent | 5bf435bd01981a65dba7c611cf8da327c8268738 (diff) | |
download | haskell-bf3b29323d69b2c6f073885fb896dd4a5c346c02.tar.gz |
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
Diffstat (limited to 'compiler/rename/RnExpr.lhs')
-rw-r--r-- | compiler/rename/RnExpr.lhs | 7 |
1 files changed, 1 insertions, 6 deletions
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 |