`tryEtaExpandRhs` might throw away useful strictness information for join points
I think currently for join points we trim the demand signature to the join arity. But that seems quite wasteful.
I noticed this while looking at #21429 (closed)
Imagine we have something like this:
[join_arity=1]
f_join = \x -> error
We know error has a signature of <1>bot
so for \x -> error
we would expect a signature like <A><1>bot
.
However tryEtaExpandRhs
trims the signature to arity one. So what we get is <A>top
.
Which is correct! But we lost the knowledge that f_join foo bar
will diverge.
Afaik we use eventual divergence for a variety of inline and floating decisions. So it's bound to make some difference. But I'm not sure how important this is in practice.