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

enter! should use language-info configure-runtime #626

Conversation

greghendershott
Copy link
Contributor

As discussed in this mailing list thread, this is important for langs like Typed Racket. This PR makes enter! do what DrRacket already does in this regard.

Note that the first commit is just "Rackety" -- convert some ifs to conds and lets to defines.

The second commit makes the substantive change.

@samth
Copy link
Sponsor Member

samth commented Apr 25, 2014

The whole of module-language-configure-runtime seems like it belongs in a library. @rfindler would you be able to use that in DrRacket?

@mflatt
Copy link
Member

mflatt commented Apr 25, 2014

I think that we may need something a little different for enter!: it may be necessary to load or re-load the module declaration to determine a runtime configuration. (If I remember correctly, DrRacket has the luxury of knowing that the relevant module declaration was just evaluated before it checks for a runtime configuration.) I'll take a closer look.

@mflatt
Copy link
Member

mflatt commented Apr 25, 2014

The more I think about this, the less I think it can work for enter!. The runtime-configure protocol is set up in an imperative way; the intent is that a context is configured in a particular way once and for all, and there's not enough plumbing to change the configuration. For example, after going into a typed module and then into an untyped module, there would need to be a way to cancel the "in a typed context" state that is installed by the typed runtime configure, but there's no protocol for that right now.

DrRacket creates a new, sandboxed context for each module, so it doesn't have this problem. I imagine that things similarly work in an Emacs mode. For something like enter!, I think we'd have to introduce a new protocol for switching runtime configurations.

@greghendershott
Copy link
Contributor Author

I see. So with the current runtime-config approach, it would only make sense to do this in the context of a hypothetical new run! procedure. Such a run! is basically what I've done in racket-mode.

I did it "on my own" because I wasn't sure it would be possible to add a run! in a way that would be xrepl compatible. And even if possible, I wasn't sure it would it be welcome; maybe there's not a very large audience for this sort of stuff.

@rfindler
Copy link
Member

Oh, I had assumed that "enter!" was more like DrRacket, I'm sorry about
that.

Robby

On Fri, Apr 25, 2014 at 9:34 AM, Greg Hendershott
notifications@github.comwrote:

I see. So with the current runtime-config approach, it would only make
sense to do this in the context of a hypothetical new run! procedure.
Such a run! is basically what I've done in racket-modehttps://github.com/greghendershott/racket-mode/blob/master/sandbox.rkt#L21
.

I did it "on my own" because I wasn't sure it would be possible to add a
run! in a way that would be xrepl compatible. And even if possible, I
wasn't sure it would it be welcome; maybe there's not a very large audience
for this sort of stuff.


Reply to this email directly or view it on GitHubhttps://github.com//pull/626#issuecomment-41399083
.

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

Successfully merging this pull request may close these issues.

4 participants