From 09d0b4a45952c79e05849782d4e692c603c5c238 Mon Sep 17 00:00:00 2001 From: qrczak Date: Mon, 30 Apr 2001 20:07:49 +0000 Subject: [PATCH] [project @ 2001-04-30 20:07:49 by qrczak] Fix the inlining bug: exprIsConApp_maybe didn't recognize constructor applications inside notes. I'm not sure if it's the right place to fix. Should notes be ignored in other uses of collectArgs? Perhaps they should be ignored inside the loop of collectArgs? And why the function marked as inline was not inlined even though it's not a constructor application? --- ghc/compiler/coreSyn/CoreUtils.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index 901bc4d..696793e 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -559,8 +559,8 @@ idAppIsValue id n_val_args \begin{code} exprIsConApp_maybe :: CoreExpr -> Maybe (DataCon, [CoreExpr]) -exprIsConApp_maybe expr - = analyse (collectArgs expr) +exprIsConApp_maybe (Note _ expr) = exprIsConApp_maybe expr +exprIsConApp_maybe expr = analyse (collectArgs expr) where analyse (Var fun, args) | Just con <- isDataConId_maybe fun, -- 1.7.10.4