summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-02-11 14:35:59 (GMT)
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-12 06:58:51 (GMT)
commitf0c0ee7d9a942a19361e72553cd08f42cc12b04a (patch)
tree0b9f72a93e00bd97fff8b6780f32c320420af9e2
parent31fc332191a6298e2643261482e9b43a4b38241b (diff)
downloadghc-f0c0ee7d9a942a19361e72553cd08f42cc12b04a.zip
ghc-f0c0ee7d9a942a19361e72553cd08f42cc12b04a.tar.gz
ghc-f0c0ee7d9a942a19361e72553cd08f42cc12b04a.tar.bz2
Fix order of arguments in specializer (#17801)
See https://gitlab.haskell.org/ghc/ghc/issues/17801#note_253330 No regression test, as it's hard to trigger.
-rw-r--r--compiler/specialise/Specialise.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs
index 7ec4013..0872067 100644
--- a/compiler/specialise/Specialise.hs
+++ b/compiler/specialise/Specialise.hs
@@ -1438,7 +1438,7 @@ specCalls mb_mod env existing_rules calls_for_me fn rhs
(lam_extra_args, app_args) -- See Note [Specialisations Must Be Lifted]
| isUnliftedType body_ty -- C.f. WwLib.mkWorkerArgs
, not (isJoinId fn)
- = ([voidArgId], unspec_bndrs ++ [voidPrimId])
+ = ([voidArgId], voidPrimId : unspec_bndrs)
| otherwise = ([], unspec_bndrs)
join_arity_change = length app_args - length rule_args
spec_join_arity | Just orig_join_arity <- isJoinId_maybe fn