From 3b9d7c8181f6edd130fb93768e4f1e32977a738c Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 17 Oct 2001 13:13:36 +0000 Subject: [PATCH] [project @ 2001-10-17 13:13:36 by simonmar] Add a comment about assumptions that we make about the result of etaExpand. --- ghc/compiler/coreSyn/CorePrep.lhs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ghc/compiler/coreSyn/CorePrep.lhs b/ghc/compiler/coreSyn/CorePrep.lhs index 5a4b636..298e599 100644 --- a/ghc/compiler/coreSyn/CorePrep.lhs +++ b/ghc/compiler/coreSyn/CorePrep.lhs @@ -427,6 +427,12 @@ mkLocalNonRec bndr dem floats rhs -- code compiled without -O. The case in point is data constructor -- wrappers. -- + -- NB2: we have to be careful that the result of etaExpand doesn't + -- invalidate any of the assumptions that CorePrep is attempting + -- to establish. One possible cause is eta expanding inside of + -- an SCC note - we're now careful in etaExpand to make sure the + -- SCC is pushed inside any new lambdas that are generated. + -- getUniquesUs `thenUs` \ us -> let rhs' = etaExpand (exprArity rhs) us rhs bndr_ty -- 1.7.10.4