Hi,
 
The following example of dynamic-require in the reference manual works in
the interactions window of DrRacket, but not in its definitions window:
 
(module a racket/base (displayln "hello")) 
(dynamic-require ''a #f)
 
How do I do this in the definitions window?
 
The reason I use dynamic-require is that I want to set some parameters
before submod a is executed.
 
I found out I can do the following:
 
#lang racket
(module a racket/base (displayln "hello"))
(module b racket/base (current-output-port (open-output-file ...)))
(require 'b)
(require 'a)
 
To me this seems an ugly trick.
In addition I am not sure this is guaranteed to work consistently.
How can I dynamically require a submod in the same source as it is defined?
 
Jos

-- 
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