Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After running a program with a runtime error, interactions repl does not know about certain symbols #1667

Open
dyoo opened this issue Oct 30, 2022 · 1 comment

Comments

@dyoo
Copy link
Member

dyoo commented Oct 30, 2022

It appears that some context gets lost if there's an error in the running of the user's program, such that the interactions window doesn't have some bindings anymore. The screenshot should demonstrate the problem.

Screenshot 2022-10-30 3 13 19 PM

On the left pane is the program with an error:
8 * circle(25, "solid", "red")

which errors out as expected. However, on the right side, I try to play with circle expressions (for example, just referencing the circle identifier itself), and suddenly it looks like the runtime has no idea what "circle" means, much to my surprise.

@jpolitz
Copy link
Member

jpolitz commented Sep 19, 2023

Thanks for reporting. This is a deliberate semantic difference between Pyret and e.g. WeScheme or DrRacket.

If definitions (or a REPL entry) has a dynamic error, its bindings are not carried forward into the next entry.

I'm fairly firm on this being a good decision (despite your justified surprised) because it turns out to be a real challenge to keep static and dynamic information about which bindings are available in sync if dynamically only some of the statically-available definitions evaluated.

Basically, we've been reticent to have the dynamic “undefined identifier” error of Typed Racket's REPL:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants