Personally, I use a 'drracket' submodule so that this submodule isn't
executed from the command line, but gets executed from within DrRacket.
This is particularly useful to avoid outputting graphical objects (such as
plots) that can't be displayed on the command line.

After pressing Run in Dracket, entering the submodule allows me to access
whatever is defined in the submodule from the interactions window.

The 'drracket' submodule is not officially supported, but you can add it
yourself in the "Submodules to run" list in DrRacket.


On Thu, Dec 13, 2018 at 10:28 AM Stephen De Gabrielle <
spdegabrie...@gmail.com> wrote:

> Hi,
>
> I suppose a better question is what do any racketeers use ‘submodules to
> run’ in DrRacket? And if so- what for?
>
> Stephen
>
> On Wed, 12 Dec 2018 at 00:21, Stephen De Gabrielle <
> spdegabrie...@gmail.com> wrote:
>
>> Hi,
>>
>> #lang racket
>> (displayln "This is the main module")
>> (module+ drracket
>>   (define foo 'FOO)
>>   (displayln "This is the drracket submodule"))
>>
>> Execute and DrRacket displays "This is the main module" in the
>> interactions window
>> type
>> (require (only-in racket/enter dynamic-enter!)
>>   (only-in syntax/location quote-module-path))
>> (dynamic-enter! (quote-module-path drracket))
>>
>> and bindings defined in the submodule are then available; e.g.
>> > foo
>> 'FOO
>>
>> Why and how do I use this for interactive development, scripting and
>> debugging?
>>
>> There is also a DrRacket function (Submodules to Run), but I can't find
>> any documentation for it.
>>
>>
>> Stephen
>>
>>
>> --
> ----
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to