bugKawa - Bugs: bug #17986, syntax bindings in letrec-syntax...

 
 

bug #17986: syntax bindings in letrec-syntax may mask literal identifiers inside

Submitter:  Chris Wegrzyn <cwegrzyn>
Submitted:  Thu 12 Oct 2006 08:27:53 PM UTC
   
 
Category:  Scheme language Severity:  3 - Normal
Item Group:  Unexpected result Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 12 Oct 2006 08:27:53 PM UTC, original submission:  

When keywords bound to syntax in letrec-syntax are also used in the literal identifiers list of one of the contained bindings, the literal identifier may be treated as a variable, rather than a literal.

The attached testcase should more clearly illustrate this. From my reading of r5rs, the output of the cases with and without the "masker" should be equivalent. I have also confirmed this behavior with MIT Scheme 7.7.1.

I am honestly not sure if this is in fact a bug or just a misunderstanding on my part of r5rs. I have tracked the issue to the call to literalIdentifierEq in SyntaxPattern.translate. If this is indeed a bug, I think the solution may be to have the literal identifiers considered as sharing the scope of the scope outside the pattern scope. I have included a patch that does this.

Chris Wegrzyn <cwegrzyn>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #10957:  syntax-masking.patch added by cwegrzyn (2KiB - text/plain - patch)
file #10956:  syntax-masking.scm added by cwegrzyn (1KiB - application/octet-stream - test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-10-12 cwegrzyn Attached File- Added syntax-masking.patch, #10957
2006-10-12 cwegrzyn Attached File- Added syntax-masking.scm, #10956

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code