Sun Mar 9 14:43:10 CET 2008

start from scratch

probably need to read a bit about modules, namespaces and
compilation. for example, what does this code actually do?

(module test mzscheme
  (provide foo boo)
  (define-syntax (boo stx)
    (syntax-case stx ()
      ((_ . args)
         (printf "compiling\n")
         #`(+ 1 2)))))
  (define foo (boo)))

when evaluated, it declares a module, compiling its code.

before i can understand things, i need to see the relation between:

  - compilation handlers
  - load/use-compiled
  - get-module-code
  - namespace
  - namespace's module registry (namespace-attach-module)
  - code inspectors

the get-module-code approach works, but somehow is context-dependent
(current namespace / module registry?). it would be interesting to
find a method independent of context.


a namespace is somthing that maps names -> things, to be used by
'eval'. it's a generalization of the standard scheme toplevel.

each namespace has a module registry. modules declared in a namespace
will attach to this registry, to be referenced by an identifier.