From 5910d12358c27b284f2737f69c089ec72b39f161 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 25 Jan 2001 17:16:41 +0000 Subject: [PATCH] [project @ 2001-01-25 17:16:41 by simonpj] Tidy up in tryRhsTyLam --- ghc/compiler/simplCore/SimplUtils.lhs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ghc/compiler/simplCore/SimplUtils.lhs b/ghc/compiler/simplCore/SimplUtils.lhs index 5f8c77f..4d9ebd3 100644 --- a/ghc/compiler/simplCore/SimplUtils.lhs +++ b/ghc/compiler/simplCore/SimplUtils.lhs @@ -546,11 +546,10 @@ tryRhsTyLam rhs -- Only does something if there's a let where (tyvars, body) = collectTyBinders rhs - worth_it (Let (NonRec x rhs) e) | isUnLiftedType (exprType rhs) = False - worth_it (Let _ e) = whnf_in_middle e - worth_it other = False + worth_it e@(Let _ _) = whnf_in_middle e + worth_it e = False - whnf_in_middle (Let (NonRec x rhs) e) | isUnLiftedType (exprType rhs) = False + whnf_in_middle (Let (NonRec x rhs) e) | isUnLiftedType (idType x) = False whnf_in_middle (Let _ e) = whnf_in_middle e whnf_in_middle e = exprIsCheap e -- 1.7.10.4