[project @ 2003-11-13 15:02:53 by simonpj]
authorsimonpj <unknown>
Thu, 13 Nov 2003 15:02:53 +0000 (15:02 +0000)
committersimonpj <unknown>
Thu, 13 Nov 2003 15:02:53 +0000 (15:02 +0000)
Stop after renaming if errors are found in TH

ghc/compiler/typecheck/TcSplice.lhs

index b7b3c29..86f8866 100644 (file)
@@ -206,7 +206,10 @@ tcTopSplice expr res_ty
 
     showSplice "expression" 
               zonked_q_expr (ppr expr2)        `thenM_`
-    rnExpr expr2                               `thenM` \ (exp3, fvs) ->
+
+       -- Rename it, but bale out if there are errors
+       -- otherwise the type checker just gives more spurious errors
+    checkNoErrs (rnExpr expr2)                 `thenM` \ (exp3, fvs) ->
 
     tcMonoExpr exp3 res_ty