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:  runtime Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed

Add a New Comment(Rich 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 ()
(DECLARE (IGNORE x ...)))))

(let ((x 5))
(ignore-variables x)
;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 Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can 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
    2013-06-03 riastradh StatusNone => Fixed
        Open/ClosedOpen => Closed
    2013-05-30 riastradh StatusFixed => None
        Open/ClosedClosed => Open
    2013-05-29 mhb StatusNone => Fixed
        Open/ClosedOpen => Closed
        Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3