From 6cac36cc16f7c4158eaf96c628bc5d64226c24e8 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 1 Nov 2006 11:04:42 +0000 Subject: [PATCH] Fix a long-standing but obscure bug in worker-wrapper generation Worker/wrapper generation sometimes has to add a dummy void (State#) argument to retain laziness. But when generating the strictness signature for the worker, I forgot to take account of the extra argument, resulting in a bogus strictness signature. Result, chaos. Trac 317 shows this up, and this patch fixes it. --- compiler/stranal/WwLib.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs index f10cb22..08fcec4 100644 --- a/compiler/stranal/WwLib.lhs +++ b/compiler/stranal/WwLib.lhs @@ -134,7 +134,7 @@ mkWwBodies fun_ty demands res_info one_shots returnUs (id, id, res_ty) ) `thenUs` \ (wrap_fn_cpr, work_fn_cpr, _cpr_res_ty) -> - returnUs ([idNewDemandInfo v | v <- work_args, isId v], + returnUs ([idNewDemandInfo v | v <- work_call_args, isId v], Note InlineMe . wrap_fn_args . wrap_fn_cpr . wrap_fn_str . applyToVars work_call_args . Var, mkLams work_lam_args. work_fn_str . work_fn_cpr . work_fn_args) -- We use an INLINE unconditionally, even if the wrapper turns out to be -- 1.7.10.4