From a7dbafe9292212f3cbc21be42eb326ab0701db7e Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Fri, 17 Mar 2017 16:25:41 +0000 Subject: No join-point from an INLINE function with wrong arity The main payload of this patch is NOT to make a join-point from a function with an INLINE pragma and the wrong arity; see Note [Join points and INLINE pragmas] in CoreOpt. This is what caused Trac #13413. But we must do the exact same thing in simpleOptExpr, which drove me to the following refactoring: * Move simpleOptExpr and simpleOptPgm from CoreSubst to a new module CoreOpt along with a few others (exprIsConApp_maybe, pushCoArg, etc) This eliminates a module loop altogether (delete CoreArity.hs-boot), and stops CoreSubst getting too huge. * Rename Simplify.matchOrConvertToJoinPoint to joinPointBinding_maybe Move it to the new CoreOpt Use it in simpleOptExpr as well as in Simplify * Define CoreArity.joinRhsArity and use it --- compiler/ghc.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/ghc.mk') diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 86091f5fc0..3f6e77ca4b 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -452,6 +452,7 @@ compiler_stage2_dll0_MODULES = \ CoreArity \ CoreFVs \ CoreSubst \ + CoreOpt \ CoreSyn \ CoreTidy \ CoreUnfold \ -- cgit v1.2.1