SetLevels: Don't set context level when floating cases

Authored by bgamari on Aug 19 2019, 9:03 AM.

Description

SetLevels: Don't set context level when floating cases

When floating a single-alternative case we previously would set the
context level to the level where we were floating the case. However,
this is wrong as we are only moving the case and its binders. This
resulted in Trac #16978, where the disrepancy caused us to
unnecessarily abstract over some free variables of the case body,
resulting in shadowing and consequently Core Lint failures.

(cherry picked from commit a2a0e6f3bb2d02a9347dec4c7c4f6d4480bc2421)

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Fri, Nov 8, 11:09 AM
Parents
rGHC3db2ab306d56: hadrian: Add enableTickyGhc helper
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHC5c87ebd7b24d: SetLevels: Don't set context level when floating cases (authored by bgamari).Fri, Nov 8, 11:09 AM