I assume it wouldn't be too difficult, and that it's worth doing even if it doesn't solve this particular problem. Can someone grant me commit privileges?<div><br></div><div><div class="gmail_quote">On Thu, Jan 19, 2012 at 5:18 AM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">(Just to be clear, that wouldn't solve the problem this time. The `='<br>
from `scheme' and `racket' are the same, but `frtime' has its own `='.)<br>
<div class="HOEnZb"><div class="h5"><br>
At Thu, 19 Jan 2012 08:19:59 -0500, Matthias Felleisen wrote:<br>
><br>
> Greg, how difficult would it be to migrate frtime to #lang racket? -- Matthias<br>
><br>
><br>
><br>
> On Jan 19, 2012, at 8:13 AM, Matthew Flatt wrote:<br>
><br>
> > The `frtime' language exports an `=' that isn't the same as `=' in<br>
> > `racket', so that's why the pattern doesn't match. (This seems like a<br>
> > further weakness of the `frtime' docs to specify the exports<br>
> > precisely.)<br>
> ><br>
> > You could avoid bound names like `=' as literals in the macro.<br>
> > Normally, it works best for a form-exporting macro to also export<br>
> > bindings for any literals in the form. Otherwise, this kind of<br>
> > confusion is common.<br>
> ><br>
> > Alternatively, you may want to match literals in your macro<br>
> > symbolically instead of by binding. You can't do that easily with<br>
> > `syntax-rules', but you can use `syntax-case*' and supply `(lambda (a<br>
> > b) (eq? (syntax-e a) (syntax-e b)))' as the literal-comparison<br>
> > function.<br>
> ><br>
> > If it were me and I decided to go in the direction of symbol equality,<br>
> > I'd use keywords instead --- `#:?' and `#:=' instead of `?' and `=' ---<br>
> > which makes clear that there's no question of binding.<br>
> ><br>
> ><br>
> > At Thu, 19 Jan 2012 10:46:37 +0100, Marijn wrote:<br>
> >> On 18-01-12 17:47, Matthew Flatt wrote:<br>
> >>> At Wed, 18 Jan 2012 12:02:10 +0100, Marijn wrote:<br>
> >>>> I would expect both forms to work. This is a reduction of a different<br>
> >>>> problem possibly caused by these issues here.<br>
> >><br>
> >> So I tried to cut down my program to a reasonably sized test-case which<br>
> >> is attached to this email. model.rkt contains (what's left of) the model<br>
> >> macro, demo1.rkt contains a small model and a (require frtime). If you<br>
> >> do "racket demo1.rkt" then you get the following error:<br>
> >><br>
> >><br>
> >> model.rkt:30:17: make-entry: bad syntax in: (make-entry (= profit<br>
> >> (for/hash ((y years)) (values y (- (hash-ref income y 0) (hash-ref<br>
> >> expenses y 0))))) (years income expenses profit))<br>
> >><br>
> >> === context ===<br>
> >> standard-module-name-resolver<br>
> >><br>
> >><br>
> >> but if you comment the (require frtime) then the error goes away. I have<br>
> >> other code that tests this same simple-economy model with the<br>
> >> non-cutdown version of the model macro and supporting code and<br>
> >> everything seems to work fine.<br>
> >><br>
> >> Any idea what's going on here?<br>
> >><br>
> >> Marijn<br>
> >><br>
> >><br>
> ------------------------------------------------------------------------------<br>
> >> [text/plain "demo1.rkt"] [~/Desktop & open] [~/Temp & open]<br>
> >><br>
> >><br>
> ------------------------------------------------------------------------------<br>
> >> [text/plain "model.rkt"] [~/Desktop & open] [~/Temp & open]<br>
> >><br>
> >><br>
> ------------------------------------------------------------------------------<br>
> >> [application/pgp-signature "signature.asc"] [~/Desktop & open] [~/Temp &<br>
> open]<br>
> > _________________________<br>
> > Racket Developers list:<br>
> > <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
_________________________<br>
Racket Developers list:<br>
<a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</div></div></blockquote></div><br></div>