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

 
 

bug #30072: rest pattern after ellipsis

Submitted by:  Szavai Gyula <szgyg>
Submitted on:  Mon 07 Jun 2010 06:43:36 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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 File(s):
   
   
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
  • -unavailable- added by wingo (Posted a comment)
  • -unavailable- added by tampe (Updated the item)
  • -unavailable- added by szgyg (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 21 Jun 2011 08:46:07 PM UTCwingoStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 20 Jun 2011 12:27:50 PM UTCtampeAttached File-=>Added ellipsis2.mb.diff, #23538
    Fri 17 Jun 2011 09:36:40 PM UTCtampeAttached File-=>Added ellipsis.mb.diff, #23536
    Thu 09 Jun 2011 09:39:00 PM UTCtampeAttached File-=>Added elipsis.diff, #23514

    Back to the top


    Powered by Savane 3.1-cleanup1