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

 
 

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

Submitted by:  Chris Wegrzyn <cwegrzyn>
Submitted on:  Thu 12 Oct 2006 08:27:53 PM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: Unexpected resultStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 12 Oct 2006 08:28:16 PM UTCcwegrzynAttached File-=>Added syntax-masking.patch, #10957
Thu 12 Oct 2006 08:27:53 PM UTCcwegrzynAttached File-=>Added syntax-masking.scm, #10956

Back to the top


Powered by Savane 3.1-cleanup