WorkWrap: "splitFun" warning triggers when join point arity is lower than idArity
When compiling GHC/Iface/Syntax.hs
with debug output I see the warning
WARNING:
splitFun
fail_shak [A]
Call stack:
CallStack (from HasCallStack):
warnPprTrace, called at compiler/GHC/Core/Opt/WorkWrap.hs:761:5 in ghc:GHC.Core.Opt.WorkWrap
And indeed
join {
fail_shak [Dmd=MC(1,C(S,L))] :: (# #) -> SDoc
[LclId[JoinId(1)(Nothing)],
Arity=2,
Str=<A> {de7k->SL shaa->SL shtY->SL},
Unf=Unf{Src=<vanilla>, TopLvl=False,
Value=True, ConLike=True, WorkFree=True,
Expandable=True,
Guidance=IF_ARGS [0] 410 60}]
fail_shak _ [Occ=Dead, Dmd=A, OS=OneShot]
= (\ (v_afo4 [OS=OneShot] :: SDocContext) -> ...
} in ... jump fail_shak (# #); ...
So the whole expression has arity 1 to begin with.
I don't think this is harmful. We can just WW fail
for arity 1. Perhaps we should relax the guard to dmds <= idArity
for join points.