bugGuile - Bugs: bug #30072, rest pattern after ellipsis

 
 

bug #30072: rest pattern after ellipsis

Submitter:  Szavai Gyula <szgyg>
Submitted:  Mon 07 Jun 2010 06:43:36 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 21 Jun 2011 08:46:07 PM UTC, comment #5: 

Pushed the fix.  I made some small alterations to the commit log; do take a look for the future.   Thanks again!

Andy Wingo <wingo>
Group administrator
Mon 20 Jun 2011 12:27:50 PM UTC, comment #4: 

Added a better changelog and email to the patch
see ellipsis2.mb.diff

(file #23538)

Stefan Israelsson Tampe <tampe>
Group Member
Fri 17 Jun 2011 09:36:40 PM UTC, comment #3: 

Ok the git format patch is in ellipsis.mb.diff

(file #23536)

Stefan Israelsson Tampe <tampe>
Group Member
Fri 17 Jun 2011 06:17:11 PM UTC, comment #2: 

Thanks for the patch Stefan, it makes sense to me.  Would you like to clean it up as a git-format-patch, with a commit log?

Andy Wingo <wingo>
Group administrator
Thu 09 Jun 2011 09:39:00 PM UTC, comment #1: 

Tried to fix ice-9/psyntax.scm to allow for this descreptancy

(define-syntax m
  (syntax-rules ()
    ((_ ?x ... . ?y) (list ?x ... ?y))))

(write (m 1 2 3 . 0))

does work with supplied patch

(file #23514)

Stefan Israelsson Tampe <tampe>
Group Member
Mon 07 Jun 2010 06:43:36 PM UTC, original submission:  

#|
R6RS-lib 12.4:
"P is of the form (P1 ... Pk Pe <ellipsis> Pm+1 ... Pn . Px), where <ellipsis> is the identifier ... and F is a list or improper list of n elements whose first k elements match P1 through Pk, whose next m - k elements each match Pe, whose next n - m elements match Pm+1 through Pn, and whose nth and final cdr matches Px."

So, this
|#

(let-syntax ((m (syntax-rules ()
                  ((_ ?x ... . ?y) (list ?x ... ?y)))))
  (write (m '(1 2 3 . 0))))

#|
is legal, but guile produces

ERROR: In procedure macroexpand:
ERROR: syntax-case: misplaced ellipsis in (dummy ?x ... . ?y)
|#

Szavai Gyula <szgyg>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #23538:  ellipsis2.mb.diff added by tampe (3KiB - text/x-patch - Tried to clean up the changelog)
file #23536:  ellipsis.mb.diff added by tampe (3KiB - text/x-patch - PATCH with git format-patch)
file #23514:  elipsis.diff added by tampe (3KiB - text/x-patch - git diff module/ice-9/psyntax.scm)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wingo (Posted a comment)
  • -email is unavailable- added by tampe (Updated the item)
  • -email is unavailable- added by szgyg (Submitted the item)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2011-06-21 wingo StatusNone Fixed
        Open/ClosedOpen Closed
    2011-06-20 tampe Attached File- Added ellipsis2.mb.diff, #23538
    2011-06-17 tampe Attached File- Added ellipsis.mb.diff, #23536
    2011-06-09 tampe Attached File- Added elipsis.diff, #23514

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code