Way to control the order of macro expansion

2014-01-01 Thread Panicz Maciej Godek
Hi, is there any way to control the order of macro expansion? Let's consider a particular problem. I'm trying to write a macro to control the visibility of certain definitions. I wrote it once, using define-macro, but it seemed to loose some relevant information, so I decided to rewrite it using de

Re: Unquote syntax

2014-01-01 Thread Ian Price
Mike Gran writes: >   (quasiquote (sym unquote func)) >   `(sym unquote func) > > Is this a valid use of unquote? > > I get that (cons 'a (list 'b 'c)) == (list 'a 'b 'c), but, I'm not sure > if unquote should be valid in that sort of construction. As has already been pointed out, since ,foo is

Re: Unquote syntax

2014-01-01 Thread Panicz Maciej Godek
Hi, [...] > I expect the following to be equal, and they are. > > (cons 'sym func) > > (quasiquote (sym . (unquote func))) `(sym . ,func) > > Guile writes them both as > > (sym . #) > > But, the following is also equivalent, which is a surprise to me. > > (quasiquote (sym unquote func)) >