Skip to content

Desugar non-recursive lets to non-recursive lets (take 2)

Arnaud Spiwack requested to merge tweag/ghc:ds-non-let-rec-2 into master

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 and mk_simple_abs_main are extracted from dsAbsBinds so that they can be shared with the new special case in dsHsBind.

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.
Edited by Arnaud Spiwack

Merge request reports