Open sorawee opened 8 months ago
This could be solved by building a data structure containing all the information of DrRacket's binding arrows and passing that to each rule as part of the analysis. The current logic dictates that if the identifier for a let
is bound-identifier=?
to anything in the right-hand side, it can't be refactored to define
. But in this case it works because the binding for the usage in the RHS doesn't resolve to a definition that the define
-replacement would shadow. Building that data structure would be a little tricky, but probably quite useful. Onto the todo list it goes.
should successfully convert let to define. It doesn't because
(define x 1)
inside the acond
clause would have shadowed(define x (cond ...))
, but that's actually fine.