Re: Macro expansion: unknown location

2014-06-15 Thread Dmitry Bogatov
* Mark H Weaver [2014-06-14 18:45:59-0400] > > Currently, Guile stores location info using a weak-key hash table, keyed > > on the datums read from the file. This means that location info cannot > > be stored for bare symbols or other immediate values (booleans, > > characters, small exact intege

Re: Macro expansion: unknown location

2014-06-14 Thread Mark H Weaver
Mark H Weaver writes: > Currently, Guile stores location info using a weak-key hash table, keyed > on the datums read from the file. This means that location info cannot > be stored for bare symbols or other immediate values (booleans, > characters, small exact integers). Symbols are not immedi

Re: Macro expansion: unknown location

2014-06-14 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > A workaround is to get location info from the outer syntax object ‘x’: > > (define-syntax zero! > (lambda (x) > (syntax-case x () > ((_ var) >(begin >(unless (identifier? #'var) > (syntax-violation 'zero! "identifier exp

Re: Macro expansion: unknown location

2014-06-11 Thread Ludovic Courtès
A workaround is to get location info from the outer syntax object ‘x’: --8<---cut here---start->8--- (define-syntax zero! (lambda (x) (syntax-case x () ((_ var) (begin (unless (identifier? #'var) (syntax-violation 'zero! "i

Re: Macro expansion

2011-01-16 Thread Hans Aberg
On 15 Jan 2011, at 21:39, Neil Jerram wrote: With my current Guile, scheme@(guile-user)> (version) $4 = "1.9.14.17-44f43" the third case behaves as you would expect: When I upgrade, then it too works. So it was a bug that has been fixed, then. scheme@(guile-user)> (version) $1 = "1.9.14.

Re: Macro expansion

2011-01-15 Thread Hans Aberg
On 15 Jan 2011, at 21:39, Neil Jerram wrote: With my current Guile, scheme@(guile-user)> (version) $4 = "1.9.14.17-44f43" the third case behaves as you would expect: That is right, I used the stable versions 1.8.x, x = 7, 8. Unfortunately, when I try to install guile-1.9.14, I get the err

Re: Macro expansion

2011-01-15 Thread Neil Jerram
Hans Aberg writes: > In the code below the 'loop' and 'begin' examples will execute the > while' loop, but if put into the body of a function, 'while' will not > run. So why, and how to fix it? > > Just copy and paste the examples below into guile. For the two first, > I get > 0123456789 > 01