Re: [racket-dev] cross-phase syntax constants

2012-07-06 Thread Matthew Flatt
I find the example too abstract to understand why the computation happens at the wrong phase when you adjust the code with `begin-for-syntax'. Can you explain a little more, maybe with a more concrete example? Just in case, here's the code that I think you have in mind for wrong phase: #lang

Re: [racket-dev] cross-phase syntax constants

2012-07-06 Thread Sam Tobin-Hochstadt
On Fri, Jul 6, 2012 at 11:00 AM, Matthew Flatt mfl...@cs.utah.edu wrote: I find the example too abstract to understand why the computation happens at the wrong phase when you adjust the code with `begin-for-syntax'. Can you explain a little more, maybe with a more concrete example? Just in

Re: [racket-dev] cross-phase syntax constants

2012-07-06 Thread Matthew Flatt
At Fri, 6 Jul 2012 11:13:44 -0400, Sam Tobin-Hochstadt wrote: I had not realized that I could sensibly wrap a module in a `begin-for-syntax`. What is the semantic difference between that and a plain submodule (other than my example working)? For `(module* _name #f )', `begin-for-syntax'

[racket-dev] cross-phase syntax constants

2012-07-05 Thread Sam Tobin-Hochstadt
I'd like to write a program basically like this: #lang racket/load (module m1 racket (define l (list #'l)) (provide l)) (module m2 racket (require (for-syntax 'm1)) (define-syntax (mac stx) #`(module* sub #f (length (list #,(car l) (provide mac)) (module m3 racket