Skip to content

QoL: reset the toplevel every time before evaluating code from the editor #411

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

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

AltGr
Copy link
Collaborator

@AltGr AltGr commented Jul 30, 2021

You might lose what you manually typed directly in the toplevel pane, but that
shouldn't be a problem, and most importantly it will avoid already defined ids
to clutter the environment.

These often cause student confusion with cases like "type t instead of t", or
a missing rec keyword that compiles because using an older definition.

…itor

You might lose what you manually typed directly in the toplevel pane, but that
shouldn't be a problem, and most importantly it will avoid already defined ids
to clutter the environment.

These often cause student confusion with cases like "type t instead of t", or a
missing `rec` keyword that compiles because using an older definition.
Copy link
Member

@erikmd erikmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good idea.

I didn't checkout-compile the PR so just a mini-question to be sure before merging:

in line with the principle of "least surprise": will the UI show The toplevel has been reset. (* loading the prelude...*), as if the student had clicked on Reset?

@erikmd erikmd added the kind: enhancement Enhancement to an existing user-facing feature. label Aug 25, 2021
@erikmd
Copy link
Member

erikmd commented Sep 1, 2021

in line with the principle of "least surprise": will the UI show The toplevel has been reset. (* loading the prelude...*), as if the student had clicked on Reset?

Just tested the PR and it's indeed the case:

2021-09-01_02-04-05_Screenshot_PR_411_OK

so I guess I can merge the PR. Thank you Louis for opening this.

@erikmd erikmd merged commit 65ce0c4 into ocaml-sf:master Sep 1, 2021
@erikmd erikmd added this to the learn-ocaml 0.13 milestone Sep 15, 2021
EmileRolley pushed a commit to EmileRolley/learn-ocaml that referenced this pull request Sep 16, 2021
…itor (ocaml-sf#411)

You might lose what you manually typed directly in the toplevel pane, but that
shouldn't be a problem, and most importantly it will avoid already defined ids
to clutter the environment.

These often cause student confusion with cases like "type t instead of t", or a
missing `rec` keyword that compiles because using an older definition.
@erikmd erikmd self-assigned this Sep 29, 2021
@erikmd erikmd mentioned this pull request Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancement to an existing user-facing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants