Hi Felix,

> (The potentially tricky part of the above paragraph is that phrase  
> "known to the compiler"; how does one tell Larceny's compiler about  
> the special forms one wants the compiler to use?  There are different  
> methods, but the easiest one for you to adopt is to make sure that  
> any such macro definitions are first loaded or defined before you  
> compile the file at all.)

That doesn't seem to be much of a limitation -- if I'm compiling a file that 
needs srfi-2 (i.e. the and-let* macro), it makes sense that I first need to 
load srfi-2.

> % cat testreqext.sch
> (require-extension (srfi 2))
> % larceny
> Larceny v0.94 "Doomsday Device" (Aug 14 2007 10:56:17,  
> precise:Linux:unified)
> larceny.heap, built on Wed Aug  1 12:53:28 EDT 2007
> 
>  > (compile-file "testreqext.sch" "testreqext-firsttry.fasl") ;; (OOPS!)
> 
>  > (load "testreqext-firsttry.fasl")
> 
> 
> Error: Undefined global variable "srfi".
> Entering debugger; type "?" for help.
> debug> q
> 
>  > (load "defreqext.sch") ; this file has the define-syntax given  
> earlier
> 
>  > (compile-file "testreqext.sch" "testreqext-secondtry.fasl")
> 
>  > (load "testreqext-secondtry.fasl") ;; this one succeeds!

Again, this doesn't seem a to be a problem to me; in fact I would have been 
surprised if the first example worked at all.

I must be missing something; are there any other simple examples that highlight 
the issue? I looked at the Trac page about extending (require), but without an 
example I'm not sure exactly what you're trying to say.


Best,
Dan

_______________________________________________
Larceny-users mailing list
[email protected]
https://lists.ccs.neu.edu/bin/listinfo/larceny-users

Reply via email to