bugMIT/GNU Scheme - Bugs: bug #30791, DECLARE doesn't work in...

 
 

bug #30791: DECLARE doesn't work in SYNTAX-RULES templates

Submitted by:  Taylor R. Campbell <riastradh>
Submitted on:  Mon 16 Aug 2010 11:02:08 PM UTC  
 
Category: runtimeSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect behavior
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: Closed
Keywords: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 03 Jun 2013 04:55:03 PM UTC, comment #5:

This was, after all, fixed in commit d1c934cb1f9cc9da9410874ec0c81742106dc7c8; the remaining issue is a separate (and not terribly important) bug.

Taylor R. Campbell <riastradh>
Project Member
Thu 30 May 2013 01:20:57 PM UTC, comment #4:

If you want to close the bug, please at least leave an analysis of the problem. I didn't have time to think about it last night and I was afraid that the bug might be closed and forgotten based on too cursory a look at it, since I knew I had left a sketchy workaround in place but forgot the details.

Why would macros inside declarations be so extreme?

Taylor R. Campbell <riastradh>
Project Member
Thu 30 May 2013 06:57:05 AM UTC, comment #3:

The "bug" is that you think something appears non-hygienic? I thought
it was a common courtesy not to file "bugs" against a project based on
mere suspicions. Do you have an example of a non-hygienic usage?

It looks like a lot of work went into map-declaration-identifiers,
which does NOT treat the declaration name as an identifier. Stripping
syntactic closures from such a name seems no less hygienic than
stripping them from a quoted datum (as in compiler:quote).

Are you seriously suggesting that (declare (fubar arg)) should be a
valid declaration as long as you have

(define-syntax fubar
(syntax-rules ()
((_ identifiers...)
(ignore identifiers...))))

in scope? That is a bit extreme even for a wishlist item.

Matt Birkholz <mhb>
Project Member
Thu 30 May 2013 12:19:07 AM UTC, comment #2:

I don't think this was fixed. In commit d1c934cb1f9cc9da9410874ec0c81742106dc7c8, I left a comment in syntax-declaration.scm saying that the mechanism to work around the problem is broken. It appears to be non-hygienic.

Taylor R. Campbell <riastradh>
Project Member
Wed 29 May 2013 11:53:26 PM UTC, comment #1:

This bug seems to have been fixed. The example compiles without warnings.

Matt Birkholz <mhb>
Project Member
Mon 16 Aug 2010 11:02:08 PM UTC, original submission:

(define-syntax ignore-variables
(syntax-rules ()
((IGNORE-VARIABLES x ...)
(DECLARE (IGNORE x ...)))))

(let ((x 5))
(ignore-variables x)
0)
;Ill-formed special form: (#[syntactic-closure 12] (#[syntactic-closure 13] x))

;;; Should be

;Value: 0

;;; The problem is that in the output of IGNORE-VARIABLES, `IGNORE'
;;; occurs not as a symbol but as an alias, which confuses the part
;;; of the syntaxer that processes declarations.

Taylor R. Campbell <riastradh>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mhb (Posted a comment)
  • -unavailable- added by mhb
  • -unavailable- added by riastradh (Submitted the item)
  •  

    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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Jun 2013 04:55:03 PM UTCriastradhStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 30 May 2013 12:19:07 AM UTCriastradhStatusFixed=>None
      Open/ClosedClosed=>Open
    Wed 29 May 2013 11:53:26 PM UTCmhbStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup