Clarifications on namespace.plt (was: [plt-scheme] Modules, structs and environments)

From: Joel J. Adamson (jadamson at
Date: Wed Nov 21 10:20:59 EST 2007

jadamson at (Joel J. Adamson) writes:

> Here's some test code:
> ;;;;;;;;;;;;;;;;;;;;
> ;;
> ;; this is a library that creates the struct and exports
> ;; it.  
> (module struct mzscheme
>   (provide (struct test-struct (f1 f2)))
>   (define-struct test-struct (f1 f2)))
> ;;

;;Replaced with the following:
(module run2 mzscheme
  (require ""
           (planet "" ("schematics" "namespace.plt" 1 0)))

  (let ((ns (make-namespace 'initial))) ;based on example in 
    (namespace-attach/require           ;doc.txt for namespace.plt
;; compiled with mzc -v --exe run2

;;And when I run it:
~/tmp/modtest $ run2
namespace-attach-module: module not instantiated
(in the source namespace): |,/home/joel/tmp/modtest/struct|

 === context === namespace-attach/require
#f::353: loop
Now, how do I *instantiate* the module?  Is there more to it than

Joel J. Adamson
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.

Posted on the users mailing list.