
I’m still not sure how I feel about #lang lindenmayer/turtle
making its own main
submodule in the user’s program. Trying to articulate why: https://github.com/greghendershott/racket-mode/issues/430#issuecomment-591409658

I definitely see the tension between “run the submodule under the cursor” and “run the program the way racket foo.rkt would” but I think I prefer F5 to be the latter

@samth I understand. On the GitHub discussion I suggested maybe what is today called racket-run
should be renamed something like racket-enter-submodule-at-point
. And a new racket-run
should do the “main else file module” behavior. As you suggest. The rest is just a matter of default keybindings for e.g. C-c C-c
and <F5>
. Which users can change.

The two choices are similar to the two command-line choices: racket foo.rkt
and racket
plus ,enter foo.rkt
.

Where the latter also doesn’t work with #lang lindenmayer/turtle
.

My feeling is that is mostly a weakness in ,enter

Note that the implementation of xrepl may well predate submodules

Maybe one way to think about it is that, although module->namespace
probably shouldn’t get contaminated with “magic” like “well I mean the main
submodule if any, else the file module”, in a world with submodules there could exist some such function and things like xrepl could use it, idk.

It’s not a complicated function to write. It might be one of those functions whose value is mainly it exists and is in documentation so people notice it. :slightly_smiling_face:

Maybe the function is I mean ~= enter!
, and that could use an enhancement.

:wave::skin-tone–3:, trying to find a typed definition of nodeset?
. I created an opaque wrapper [#:opaque Nodeset nodeset?]
but it’s not enough usable to manipulate its content (first
, map second …
) in a way that works in the untyped world. Or am I going to far and should I use Any?

Any is also not going to help

If it’s a list, then you probably want to use a list type

indeed

looks like some recursive list type

@br.teague has joined the channel