[racket-dev] [racket] using syntax/modcode and make-base-namespace
the matrix prototype teachpack uses snips like the images in drracket and sets up some sharing with drracket. Perhaps that is a cause of the problem with snip-class readers?
On May 20, 2011, at 11:45 AM, Danny Yoo wrote:
> I'm using syntax/modcode, and am running across an error that I don't
> understand yet. Here's test code to demonstrate:
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> #lang racket
>
> (require syntax/modcode)
>
> (define collects-dir
> (normalize-path
> (let ([p (find-system-path 'collects-dir)])
> (cond
> [(relative-path? p)
> (find-executable-path (find-system-path 'exec-file)
> (find-system-path 'collects-dir))]
> [else
> p]))))
>
> (void
> (parameterize ([current-namespace (make-base-namespace)])
> (get-module-code (build-path collects-dir "htdp" "tests"
> "matrix-client.rkt"))))
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
>
> I see the following error:
>
> ##########################################################################
> read-syntax: cannot load snip-class reader: #"(lib \"matrix.ss\" \"htdp\")"
>
> === context ===
> /research/plt/software/racket/5.1.1/std/collects/wxme/wxme.rkt:382:2: find-class
> /research/plt/software/racket/5.1.1/std/collects/wxme/wxme.rkt:208:2: read-snip
> /research/plt/software/racket/5.1.1/std/collects/wxme/wxme.rkt:617:4: read-proc
> /research/plt/software/racket/5.1.1/std/collects/mzlib/port.rkt:167:4:
> do-read-it
> /research/plt/software/racket/5.1.1/std/collects/lang/htdp-reader.rkt:13:4: loop
> /research/plt/software/racket/5.1.1/std/collects/lang/htdp-reader.rkt:13:4: loop
> /research/plt/software/racket/5.1.1/std/collects/wxme/wxme.rkt:695:2:
> wxme-read-syntax
> /research/plt/software/racket/5.1.1/std/collects/syntax/modcode.rkt:47:8
> /research/plt/software/racket/5.1.1/std/collects/syntax/modcode.rkt:79:2: core
> ##########################################################################
>
>
> Am I misusing it?
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users