[r6rs] underscore is not a pattern variable and can appear any number of times

2010-06-21 Thread Marco Maggi
The following R6RS program: (import (rnrs)) (define-syntax ciao (lambda (stx) (syntax-case stx () ((_ _) "ciao\n" (display (ciao 1)) fails with: ;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-autocompile argument to disable. ;;;

[r6rs] probably bad syntax expansion

2010-06-21 Thread Marco Maggi
The following R6RS program: (import (rnrs)) (define (%general-string-append . args) (let-values (((port getter) (open-string-output-port))) (let loop ((args args)) (if (null? args) (getter) (let ((thing (car args))) (display (if (identifier? (car args))

Re: [r6rs] probably bad syntax expansion

2010-06-21 Thread Marco Maggi
"Marco Maggi" wrote: > The following R6RS program: Sorry for the self reply; the problem goes away defining IDENTIFIER->STRING before its usage. I can understand this, but it is not R6RS behaviour. Maybe just documenting it as incompatibility is fine. -- Marco Maggi

[r6rs] #\x0 is a perfectly valid character datum representation

2010-06-21 Thread Marco Maggi
The following R6RS program: (import (rnrs)) #\x0 fails with: ;;; note: source file proof.sps ;;; newer than compiled /home/marco/.cache/guile/ccache/2.0-0.R-LE-4/home/marco/var/tmp/proof.sps.go Backtrace: In ice-9/boot-9.scm: 170: 10 [catch #t # ...] In unknown file: ?: 9 [catch-clos

Re: [r6rs] probably bad syntax expansion

2010-06-21 Thread Marco Maggi
"Marco Maggi" wrote: > Sorry for the self reply; the problem goes away defining > IDENTIFIER->STRING before its usage. I can understand > this, but it is not R6RS behaviour.Maybe just > documenting it as incompatibility is fine. I take it back. It imposes an order on defini

Re: [r6rs] #\x0 is a perfectly valid character datum representation

2010-06-21 Thread Andy Wingo
On Mon 21 Jun 2010 10:12, Marco Maggi writes: > #\x0 Add (read-enable 'r6rs-hex-escapes) to your guile init file. Mike: is there a more sensible default than the one we have? Thanks, Andy -- http://wingolog.org/

Re: [r6rs] underscore is not a pattern variable and can appear any number of times

2010-06-21 Thread Andy Wingo
On Mon 21 Jun 2010 09:35, Marco Maggi writes: > (syntax-case stx () > ((_ _) Fixed in master, thanks for the report. It is an incompatible change in R6RS, but I think it's for the better. Ciao, A -- http://wingolog.org/

Re: [r6rs] probably bad syntax expansion

2010-06-21 Thread Andy Wingo
Hello, On Mon 21 Jun 2010 09:59, Marco Maggi writes: > (define A ) > (define-syntax B <>) > (A) I have abbreviated your illuminating example. I don't really know what to think of it, except to say that for top-level programs Guile implements "REPL semantics". It would seem that both for toplev

Re: [r6rs] #\x0 is a perfectly valid character datum representation

2010-06-21 Thread Mike Gran
> From: Andy Wingo wi...@pobox.com >> #\x0 > Add (read-enable 'r6rs-hex-escapes) to your > guile init file. > Mike: is there a more sensible default than the one we > have? The idea behind not enabling it by default is because the r6rs *string* escapes are not backwards compatible with the he

Re: [r6rs] #\x0 is a perfectly valid character datum representation

2010-06-21 Thread Andy Wingo
Hi Mike, Thanks for the explanation :-) On Mon 21 Jun 2010 22:27, Mike Gran writes: > r6rs hex *character* escapes and Guile 1.8.x octal character escapes > could logically coexist without confusion. Let's do that. Shall you, or shall I? > But, it might be confusing to have r6rs hex character

Re: [r6rs] #\x0 is a perfectly valid character datum representation

2010-06-21 Thread Mike Gran
> From: Andy Wingo wi...@pobox.com > Hi Mike, > Thanks for the explanation :-) >> r6rs hex *character* escapes and Guile 1.8.x octal >> character escapes could logically coexist without confusion. > Let's do that. Shall you, or shall I? It would happen more quickly if you did it. You'd just h