[plt-scheme] syntax/loc for synthesized location data

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Mar 2 17:24:26 EST 2009

At Fri, 27 Feb 2009 11:18:08 -0500, Dave Herman wrote:
> Carl Eastlund wrote:
> 
> > I then got different behavior by providing a source other than #f:
> > 
> >> (define loc2 (datum->syntax #f 'goodbye (list 'here 100 4 4 5)))
> >> loc2
> > .#<syntax:100:4>
> >> (define stx2 (syntax/loc loc2 (list 5 4 3 2 1)))
> >> stx2
> > .#<syntax:100:4>
> 
> Interesting. So do we know whether this is a bug or an undocumented but 
> intended invariant? (I'm hoping the former.)

This is finally fixed in SVN. The `syntax/loc' form now transfers a
location as long as either the source or position is non-#f.



Posted on the users mailing list.