From: Jim Ursetto <[email protected]> Subject: [Chicken-hackers] set-read-syntax! Date: Tue, 20 Apr 2010 02:05:46 -0500
> I have a module "foo" that uses set-read-syntax!. Although this is a > form of syntax, it is not stored in the .import file with macro > syntax. Therefore it will not be available at compile time when a > user does (use foo). > > The Chicken 3 solution is to force users to compile with -X foo if > they want the read syntax. That seems excessive for Chicken 4--no > need to load the entire module at compile time--but I don't know any > other way to do it. Except if I make a separate file > "foo-read-syntax" with just the set-read-syntax! call, which the user > must still load with `-X foo-read-syntax`. > > Other solutions? > You can use `begin-for-syntax' to place arbitrary code into the import library. The real problem here is that the currently compiled file is read *before* resolving imports, so the read syntax is available too late. I can currently not provide anything better than what you suggest. cheers, felix _______________________________________________ Chicken-hackers mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-hackers
