chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Strange problems with args egg


From: Jim Ursetto
Subject: Re: [Chicken-users] Strange problems with args egg
Date: Sat, 3 Aug 2013 10:37:08 -0500

This patch to the args egg should fix things -- could you try it?
Jim

Attachment: args-patch.diff.txt
Description: Text document


On Aug 3, 2013, at 6:56 AM, Jonathan Chan <address@hidden> wrote:

> Hello all,
> 
> First off, I am very new to Chicken. I recently tried using the args egg
> and wrote a syntax-rules macro to let me clarify a bunch of copy-paste
> declarations, but seem to be running into some strange problem where
> numbers are appended to the names of certain symbols.
> 
> Here is the smallest amount of args-using Chicken that will cause the
> problem:
> 
> (define-syntax test
>  (syntax-rules ()
>    ((test)
>     (begin
>       (define opts (list (args:make-option (h help) #:none "display
>       this text" (print "foo"))))
>       (write (args:parse (command-line-arguments) opts))))))
> 
> (test)
> 
> ... and to a local copy I made of the args egg I added the following at
> the beginning of the definition of the args:parse function (included):
> 
> (define (args:parse args options-list . optionals)
>  (for-each (lambda (o)
>              (write (option-names (args:option-option o))))
>            options-list)
>  (newline)
> 
> The strange thing is that h and help seem to have turned into ("h390"
> "help391"), causing problems.
> 
> Is there something I need to change to fix the problem? Sorry for many
> misunderstandings.
> 
> Here is the Chicken version I am running:
> 
> CHICKEN
> (c) 2008-2013, The Chicken Team
> (c) 2000-2007, Felix L. Winkelmann
> Version 4.8.0.4 (stability/4.8.0) (rev 578619b)
> linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
> compiled 2013-07-15 on aeryn.xorinia.dim (Darwin)
> 
> Thanks,
> -- 
> Jonathan Chan
> address@hidden
> 
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]