Desugar non-recursive lets to non-recursive lets (take 2)
This reverts commit 522bd584. And takes care of the case that I missed in my previous attempt. Namely the case of an AbsBinds with no type variables and no dictionary variable.
Most of the code was already reviewed, the new bits are:
- The extra special case in
dsHsBind
- The corresponding Note [The no-tyvar no-dict case] (which replaces and extend the obsolete Note [Abstracting over tyvars only])
- Two (non-exported) functions
mk_aux_abs_binds
andmk_simple_abs_main
are extracted fromdsAbsBinds
so that they can be shared with the new special case indsHsBind
.
See #23550 (closed) for more discussion.
Extracted from !10952 (merged) because the CI is giving me surprising result, and I want to isolate the effects of the various parts.
TODO before merge
-
Squash the commits addressing the reviews.