i have the following two files, one that only requires the other and
calls a macro and the other one that defines that macro:

=== main.rkt
#lang racket

(require "err.rkt")

=== err.rkt
#lang racket

 (struct s (arg) #:transparent)

 (define (fun arg)
   (printf "arg: ~a\n" arg)))

(define-syntax (a stx)
  (syntax-case stx ()
     (with-syntax ([v #`#,(s 123)])
            (fun v))))]))

(provide a)

When executing 'racket main.rkt' directly i get the expected output
arg: #(struct:s 123)
but when i try to call 'raco make main.rkt' instead, i get this strange

arg: #(struct:s 123)
write: cannot marshal value that is embedded in compiled code
  value: (s 123)
/home_local/hamm_to/racket/racket- call-with-break-parameterization
/home_local/hamm_to/racket/racket- maybe-compile-zo /home_local/hamm_to/racket/racket- do-check
/home_local/hamm_to/racket/racket- for-loop /home_local/hamm_to/racket/racket- [running body] /home_local/hamm_to/racket/racket- [running body] /home_local/hamm_to/racket/racket- [running body]

I think i need a little help to understand what is happening here
and what i am doing wrong. I had expected that running and compiling
works on the same set of programs.

Thanks for any clarification.


Tobias Hammer
DLR / Institute of Robotics and Mechatronics
Tel.: 08153/28-1487
Mail: tobias.ham...@dlr.de
 Racket Developers list:

Reply via email to