larcenists / larceny

Larceny Scheme implementation
Other
204 stars 33 forks source link

syntax definitions don't propagate into fasl files #101

Closed larceny-trac-import closed 9 years ago

larceny-trac-import commented 11 years ago

Reported by: pnkfelix on Mon Jun 12 03:04:23 2006 Consider the following interactions with Larceny, where foo.sch just contains syntax definition: (define-syntax bazzle (syntax-rules () ((bazzle) 'basil)))

% larceny
> (compile-file "foo.sch")
> (exit)

% larceny
> (load "foo.sch")
> (bazzle)
'basil
> (exit)

% larceny
> (load "foo.fasl")
> (bazzle)

Error: Reference to undefined global variable "bazzle".

The fasl file and the sch file have different effects when you load them. This essentially implies that users have to be very careful about when they compile files that contain syntax definitions. (Perhaps this was a deliberate design choice, but PnkFelix sees it as a bug).

PnkFelix is working around this problem for his designs on ExtendingRequire, but it would be a good thing to think about fixing in general.

larceny-trac-import commented 11 years ago

Author: will R6RS libraries will fix this problem. Efforts should go toward implementing R6RS libraries.

larceny-trac-import commented 11 years ago

Author: pnkfelix It won't fix the problem for legacy systems like Snow.

But I don't mind proposing the solution of making our compiler faster and leaving everything to CompileOnEval.

WillClinger commented 9 years ago

Now that we have the R7RS as well as the R6RS, Larceny's R5RS serves only two groups of users:

Both groups have learned to live with the problem. We should focus on R7RS.