Hi,

The printer and reader doc states that the default printer can write *core* 
types to be re-read later.
I am making a kind of "3d IDE" for a custom language using the pict3d lib. 
I would like to re-use the pict3d types, and prototype with an interpreter 
that consumes a valid racket datastructure, since my language would not be 
practical in text format and to avoid writing a lexer/parser.

Is there a way to dump a program datum containing custom types such as 
those in pict3d to a file as text, to use as "source code"?

For example,

#lang racket
(require pict3d)
(define o (open-input-string))
(write (pos 0 0 0) o)
(read (open-input-port (get-output-string o)))


yields: 'origin, that doesn't mean anything out of the pict3d context. So 
how can I make that work?

Essentially, I'd like something equivalent to the below (incorrect):

#lang racket
(define o (open-output-string))
(module m racket
         (require pict3d)
         (pos 0 0 0))
(write m o)
(read (open-input-string (get-output-string o)))


Is that possible?

Thanks,
Raoul

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/1a126873-2454-4f8c-bc29-e5bb6b6ba42f%40googlegroups.com.

Reply via email to