[Larceny-users] using macros to handcode random walk in arbitrary dimension

Felix Klock felixluser at pnkfx.org
Tue May 5 12:38:02 EDT 2009


Marijn (cc'ing larceny-users)-

On May 5, 2009, at 12:18 PM, Marijn Schouten (hkBst) wrote:

> I have written syntax-case macro code that should construct this
> function for arbitrary dimension, except I cannot get it to work. I  
> have
> attached the complete program (68 lines) with the offending code  
> commented out.

It looks to me like you are invoking larceny in a manner where it will  
start up in its default mode which is an R5RS read-eval-print loop  
(plus some Larceny-specific extensions).

This default mode is different from Larceny's ERR5RS and R6RS modes.   
In particular, there is *no* support for syntax-case in Larceny's  
default mode.

Would that explain the problems you are experiencing?

----

You will have to decide whether you want to switch to running Larceny  
in a different mode (such as its ERR5RS mode), which will require some  
changes to your code, or if you want to switch to using Larceny's  
default macro system (where the only support for procedural macros is  
its explicit-renaming transformer macros [1]), which will require an  
entirely different set of changes to your code.

-Felix

[1] William D Clinger, "Hygienic macros through explicit renaming."   
In Lisp Pointers IV(4), 25-28, December 1991. ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/prop/exrename.ps.gz





More information about the Larceny-users mailing list