From: simonm Date: Wed, 17 Mar 1999 11:03:36 +0000 (+0000) Subject: [project @ 1999-03-17 11:03:36 by simonm] X-Git-Tag: Approximately_9120_patches~6379 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e28f99fd4328e0fd4522296fa71a33caec510ee6;p=ghc-hetmet.git [project @ 1999-03-17 11:03:36 by simonm] Ignore type lambdas for the purposes of occurrence analysis. --- diff --git a/ghc/compiler/simplCore/OccurAnal.lhs b/ghc/compiler/simplCore/OccurAnal.lhs index 9bb19b9..5b021f0 100644 --- a/ghc/compiler/simplCore/OccurAnal.lhs +++ b/ghc/compiler/simplCore/OccurAnal.lhs @@ -631,6 +631,14 @@ occAnal env (App fun arg) (fun_usage `combineUsageDetails` mapVarEnv markLazy arg_usage, App fun' arg') }} +-- Ignore type variables altogether +-- (a) occurrences inside type lambdas only not marked as InsideLam +-- (b) type variables not in environment + +occAnal env expr@(Lam x body) | isTyVar x + = case occAnal env body of { (body_usage, body') -> + (body_usage, Lam x body') + } -- For value lambdas we do a special hack. Consider -- (\x. \y. ...x...)