Hey, I have found another bit of confusion between eval and compile. Again, I suspect it's related to using a top level begin, but I'm not sure why.
I have the following program: #lang racket (define prog #'(begin (module foo racket (#%plain-module-begin (provide x) (define x 5))) (require 'foo) x)) ; (eval prog) ; (eval (compile prog)) When I uncomment the first line to run `(eval prog)` the program runs fine. However, when I uncomment the second line to run `(eval (compile prog))`, I get the following error: define-values: assignment disallowed; cannot re-define a constant constant: x Also, when I use syntax/toplevel and add the following line: `(eval (compile (expand-syntax-top-level-with-compile-time-evals prog)))` I get the same error. Can you give me some intuition as to what the problem is here? ~Leif Andersen -- 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.