[racket] Places and submodules
I think that error is for the situation where you write:
(dynamic-place ''temp2 'place-main)
You need the first quote to be quoted require spec and the second quote
because the module's name itself has a quote in it.
As to your original problem, I think you can use `submod' in the require
spec to get a place to use a submodule.
Robby
On Tue, Mar 12, 2013 at 1:06 PM, Harry Spier <vasishtha.spier at gmail.com>wrote:
> Apologies, I see the problem now. I missed where it says in the
> documentation for dynamic-places.
> "The module-path argument must not be a module path of the form (quote
> sym) unless the module is predefined (see module-predefined?)."
>
> Harry Spier
>
> On Tue, Mar 12, 2013 at 12:33 AM, Harry Spier <vasishtha.spier at gmail.com>wrote:
>
>> Dear list members,
>>
>> I'm going through the documentation on "places". The example in the
>> reference manual 10.5 works as described but when instead of having the
>> code in two modules in separate files as in the example, I use submodules
>> as follows,
>> --------------------------
>> #lang racket
>> (module temp2 racket
>> (provide place-main)
>>
>> (define (place-main pch)
>> (place-channel-put pch (format "Hello from place ~a"
>> (place-channel-get pch)))))
>>
>> (require 'temp2)
>>
>> (let ([pls (for/list ([i (in-range 2)])
>> (dynamic-place 'temp2 'place-main))])
>> (for ([i (in-range 2)]
>> [p pls])
>> (place-channel-put p i)
>> (printf "~a\n" (place-channel-get p)))
>> (map place-wait pls))
>>
>> -------------------------
>>
>> I get the following error message.
>>
>> standard-module-name-resolver: collection not found
>> collection: "temp2"
>> in collection directories:
>> C:\Users\Harry\AppData\Roaming\Racket\5.3.3\collects
>> C:\Program Files\Racket\collects
>> context...:
>> standard-module-name-resolver
>> standard-module-name-resolver: collection not found
>> collection: "temp2"
>> in collection directories:
>> C:\Users\Harry\AppData\Roaming\Racket\5.3.3\collects
>> C:\Program Files\Racket\collects
>> context...:
>> standard-module-name-resolver
>>
>> Can someone explain why this error?
>>
>> Thanks,
>> Harry Spier
>>
>>
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130312/91ffc2c1/attachment.html>