From e02c1fd6eb9033dc0cce1555e04a572756f58460 Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 8 Dec 2000 13:44:28 +0000 Subject: [PATCH] [project @ 2000-12-08 13:44:28 by simonpj] LiberateCase fiddling --- ghc/compiler/simplCore/LiberateCase.lhs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/ghc/compiler/simplCore/LiberateCase.lhs b/ghc/compiler/simplCore/LiberateCase.lhs index e11950c..d9ba473 100644 --- a/ghc/compiler/simplCore/LiberateCase.lhs +++ b/ghc/compiler/simplCore/LiberateCase.lhs @@ -244,11 +244,8 @@ Ids libCaseId :: LibCaseEnv -> Id -> CoreExpr libCaseId env v | Just the_bind <- lookupRecId env v -- It's a use of a recursive thing - -- = not (null free_scruts) -- with free vars scrutinised in RHS - = if null free_scruts then - pprTrace "No:" (ppr v $$ pprEnv env) (Var v) - else - pprTrace "Yes:" (ppr v) $ Let the_bind (Var v) + , not (null free_scruts) -- with free vars scrutinised in RHS + = Let the_bind (Var v) | otherwise = Var v @@ -306,8 +303,8 @@ lookupLevel (LibCaseEnv bomb lvl lvl_env rec_env scruts) id freeScruts :: LibCaseEnv -> LibCaseLevel -- Level of the recursive Id - -> [Id] -- Ids that are bound ouside the recursive Id, (level <=) - -- but which are scrutinised on the way to this call + -> [Id] -- Ids that are scrutinised between the binding + -- of the recursive Id and here freeScruts (LibCaseEnv bomb lvl lvl_env rec_env scruts) rec_bind_lvl - = [v | (v,lvl) <- scruts, lvl <= rec_bind_lvl] + = [v | (v,scrut_lvl) <- scruts, scrut_lvl > rec_bind_lvl] \end{code} -- 1.7.10.4