2017-08-17 8:40 GMT+02:00 Sam Waxman <samwax...@gmail.com>:

> Hey all, I ended up figuring this out.
> The solution was essentially to make a reader that looked like this:
>
> (define (read-syntax input-port)
>   (let ([copy1 (copy input-port)]
>         [copy2 (copy input-port)])
>      (with-syntax ([mod1 (Lang1-read-syntax copy1)]
>                    [mod2 (Lang2-read-syntax copy2)])
>         #'(module mod-name racket
>              mod1
>              mod2
>              (require *mod1's name*)
>              (require *mod2's name*)))))
>
> Then users can do a #lang *This language's name*
> and it will produce the results of both languages! Turning them into
> dynamic requires and wrapping them with error handling works too!



 Nice solution!

/Jens Axel

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to