slag-plt / scamper

A mini-Scheme implementation designed for teaching, targeting the web
0 stars 0 forks source link

Stepper does not render let-binds correctly #57

Closed psosera closed 9 months ago

psosera commented 9 months ago

Version 2.3.3. When stepping, the following code:

(let [(x (+ 1 1))] x)

Produces:

Evaluating expression...
(let ([x (+ 1 1)]) x)
--> 
ICE (sem.dumpToExp): Stack size is not 1 after execution: 2
Error: Stack size is not 1 after execution: 2
    at dumpToExp (https://csc151.cs.grinnell.edu/scamper/js/ide.js:25583:15)
    at stateToExp (https://csc151.cs.grinnell.edu/scamper/js/ide.js:25594:15)
    at Sem.step (https://csc151.cs.grinnell.edu/scamper/js/ide.js:26060:65)
    at Scamper.stepProgram (https://csc151.cs.grinnell.edu/scamper/js/ide.js:27762:30)
    at HTMLButtonElement.<anonymous> (https://csc151.cs.grinnell.edu/scamper/js/ide.js:29697:69)

Reconstitution of the body of the let is not correct within dumpToExp.