user said "inline"!
To avoid this we pre-emptively eta-expand the definition, so that foo
-has arity 2 (one for the Eq and one for x); and that in turn should
-mean that (foo d) is a PAP and we don't share it.
-
+has the arity with which it is declared in the source code. In this
+example it has arity 2 (one for the Eq and one for x). Doing this
+should mean that (foo d) is a PAP and we don't share it.
Note [Nested arities]
~~~~~~~~~~~~~~~~~~~~~
bs | not (null bs) -> do { warnDs (dead_msg bs); return Nothing }
| otherwise -> do
- { (spec_unf, unf_pairs) <- specUnfolding wrap_fn (idUnfolding poly_id)
+ { (spec_unf, unf_pairs) <- specUnfolding wrap_fn (realIdUnfolding poly_id)
; let f_body = fix_up (Let mono_bind (Var mono_id))
spec_ty = exprType ds_spec_expr