Well, I think I figured out how to get further:

with example1.rkt being:

```
#lang racket/base
;; #lang dungeon/misery

(define ((make-start-game read-save-file) player-name)
  (list 'running-this-read-save-file: read-save-file
        'on-player-name: player-name
        'result: (read-save-file player-name)))

(define (entrypoint read-save-file)
  (make-keyword-procedure
   (lambda (kws kw-args method-name . args)
     (define method
       (case method-name
         ['start-game (make-start-game read-save-file)]
         ['what-is-make-start-game (lambda () make-start-game)]
         ['throw-error
          (lambda ()
            (error "oh no :("))]
         [else (error "owch!")]))
     (keyword-apply method kws kw-args args))))

(provide entrypoint)
```

It seems I'm able to read things in:

```
read-example.rkt> (parameterize ([current-namespace
                                   (module->namespace 'racket/base)]
                                  [read-accept-reader #t])
                     (define stx
                       (call-with-input-file "example1.rkt"
                         (lambda (ip)
                           (read-syntax 'my-module ip))))
                     (eval stx)
                     (eval '(require 'example1))
                     (dynamic-require ''example1 'entrypoint))
#<procedure:entrypoint>
```

I know that's kludgy, but it seems closer to being on track.  Thanks to
everyone who has responded.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/87sgmvh0dr.fsf%40dustycloud.org.

Reply via email to