* Queries about while doc and (ice-9 command-line)
@ 2011-04-28 18:12 Neil Jerram
2011-04-28 19:47 ` Andy Wingo
0 siblings, 1 reply; 3+ messages in thread
From: Neil Jerram @ 2011-04-28 18:12 UTC (permalink / raw)
To: guile-devel
Hi there,
I was looking today at some recent commits, and noticed a few queries...
In
http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=91956a94fe6363cf69d574b56397962ec6ef4468:
+@example
+(while #f (error "not reached")) @result{} #f
+(while #t (break)) @result{} #t
+(while #f (break 1 2 3)) @result{} 1 2 3
+@end example
I think the #f in the last while line should be #t.
In
http://git.savannah.gnu.org/cgit/guile.git/tree/module/ice-9/command-line.scm?h=stable-2.0&id=90779ad9a1d8b2533ad8495753677aebf5626571:
(if (pair? do-script)
(set-car! do-script arg))
(set! arg0 arg)
(set! interactive? #f)
(finish args
(cons `(load ,arg) out)))
Does this code mean that we load the script twice, in the -ds case?
If that's right, I believe the -s block has the same issue.
((string=? arg "-x") ; add to %load-extensions
(if (null? args)
(error "missing argument to `-L' switch"))
(set! user-extensions (cons (car args) user-extensions))
(parse (cdr args)
out))
In the error message here, -L should be -x.
;; Handle the `-e' switch, if it was specified.
,@(if entry-point
`((,entry-point (command-line)))
'())
Do we go interactive after seeing a -e option? I don't see a setting of
the interactive? variable that would prevent this?
Regards,
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Queries about while doc and (ice-9 command-line)
2011-04-28 18:12 Queries about while doc and (ice-9 command-line) Neil Jerram
@ 2011-04-28 19:47 ` Andy Wingo
2011-05-02 17:21 ` Neil Jerram
0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2011-04-28 19:47 UTC (permalink / raw)
To: Neil Jerram; +Cc: guile-devel
Hi Neil,
Thanks for the review!
On Thu 28 Apr 2011 20:12, Neil Jerram <neil@ossau.uklinux.net> writes:
> +@example
> +(while #f (error "not reached")) @result{} #f
> +(while #t (break)) @result{} #t
> +(while #f (break 1 2 3)) @result{} 1 2 3
> +@end example
>
> I think the #f in the last while line should be #t.
Indeed, fixed.
> (if (pair? do-script)
> (set-car! do-script arg))
> (set! arg0 arg)
> (set! interactive? #f)
> (finish args
> (cons `(load ,arg) out)))
>
> Does this code mean that we load the script twice, in the -ds case?
I think so, yes; unfortunately. Fixed. Would this merit a quick 2.0.2,
you think?
>
> If that's right, I believe the -s block has the same issue.
>
> ((string=? arg "-x") ; add to %load-extensions
> (if (null? args)
> (error "missing argument to `-L' switch"))
> (set! user-extensions (cons (car args) user-extensions))
> (parse (cdr args)
> out))
>
> In the error message here, -L should be -x.
Fixed also.
> Do we go interactive after seeing a -e option? I don't see a setting of
> the interactive? variable that would prevent this?
This appears to be the old behavior. Am I mistaken?
Thanks,
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Queries about while doc and (ice-9 command-line)
2011-04-28 19:47 ` Andy Wingo
@ 2011-05-02 17:21 ` Neil Jerram
0 siblings, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2011-05-02 17:21 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-devel
Andy Wingo <wingo@pobox.com> writes:
>> Does this code mean that we load the script twice, in the -ds case?
>
> I think so, yes; unfortunately. Fixed. Would this merit a quick 2.0.2,
> you think?
I guess that would be better, if Ludo has time to make the release.
>> Do we go interactive after seeing a -e option? I don't see a setting of
>> the interactive? variable that would prevent this?
>
> This appears to be the old behavior. Am I mistaken?
No, sorry, I was. This is fine then.
Regards,
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-02 17:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-28 18:12 Queries about while doc and (ice-9 command-line) Neil Jerram
2011-04-28 19:47 ` Andy Wingo
2011-05-02 17:21 ` Neil Jerram
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).