[plt-scheme] macros and eval

From: jomirez (jomirez at gmail.com)
Date: Fri Mar 14 06:15:43 EDT 2008

Hi, i'm trying to create my own mini-language for backup purposes.

I defined a couple of functions for starting & stopping services,
vmware-server instances, mountning and unmounting of windows shares
etc.

For even sleeker syntax, i created  a couple of macros so i can write
my backup-jobs like

(job "vmware-backup"
     (with-stopped-vmware-image "c:\\images\\test\\test.vmx"
      (with-share "x:" "\\\\backserver\\vmware"
                  (copy "c:\\images\\test" "x:\\"))))

.......

When i stick the code into the body of the "main" source file, all
works fine  But i want to compile it into executable (for
deployability) and use that as an interpreter for the job files. I
tried evaling/loading the file with job definitions from within the
main code, and the macros won't get expanded (complaining "reference
to undefined identifier: job")

Do i have to execute the transformation process manualy, or is there
even better solution ?

thanks in advance,

j.


Posted on the users mailing list.