From: sewardj Date: Tue, 16 Jan 2001 15:44:42 +0000 (+0000) Subject: [project @ 2001-01-16 15:44:42 by sewardj] X-Git-Tag: Approximately_9120_patches~2882 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e07fe7df35dbf0880c520cc65dff257ee35c6401;p=ghc-hetmet.git [project @ 2001-01-16 15:44:42 by sewardj] hscExpr: be a bit more careful about which pcs version is returned, so that the environment isn't totally hosed following a type error. --- diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 6b96122..d61ce40 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -412,14 +412,14 @@ hscExpr dflags hst hit pcs0 this_module expr (pcs1, maybe_renamed_expr) <- renameExpr dflags hit hst pcs0 this_module parsed_expr; case maybe_renamed_expr of - Nothing -> return (pcs1, Nothing) + Nothing -> return ({-WAS:pcs1-} pcs0, Nothing) Just (print_unqual, rn_expr) -> do { -- Typecheck it maybe_tc_return <- typecheckExpr dflags pcs1 hst print_unqual this_module rn_expr; case maybe_tc_return of { - Nothing -> return (pcs1, Nothing); + Nothing -> return ({-WAS:pcs1-} pcs0, Nothing); Just (pcs2, tc_expr, ty) -> do -- if it isn't an IO-typed expression,