Previously, we'd unconditionally try to substitute in or bind the
variable, but this could go wrong as we only shift in the case where
CSE lifted out a subexpression. Concretely, imagine trying to lift
Library out of this expression:
let Library = 2 in Library
This is a theoretical problem at present, as none of the expressions
being operated on actually look like that. But it's still a potential
landmine, so it's worth fixing for the future.
Previously, we'd unconditionally try to substitute in or bind the variable, but this could go wrong as we only shift in the case where CSE lifted out a subexpression. Concretely, imagine trying to lift
Library
out of this expression:let Library = 2 in Library
This is a theoretical problem at present, as none of the expressions being operated on actually look like that. But it's still a potential landmine, so it's worth fixing for the future.