I see - thanks for the clarification ;)<br><br><div><span class="gmail_quote">On 6/6/07, <b class="gmail_sendername">Chongkai Zhu</b> <<a href="mailto:czhu@cs.utah.edu">czhu@cs.utah.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As you expected, the former (more likely one) happens.<br><br>(require (lib "7.ss" "srfi"))<br>(program (requires srfi-9)<br> (feature-cond<br> (else (code (define y 6)))))<br>y<br><br>
=> 6<br><br>You are missing a "code" in the code.<br><br>Chongkai<br><br>YC wrote:<br>> Thanks Chongkai for the suggestion.<br>><br>> Looking at the doc it can only do conditional expansion based on<br>
> availability of srfi-x, so I would probably have to try to hack my own<br>> solution based on the design.<br>><br>> On the other hand, I seem to either have a misunderstanding of the<br>> SRFI or come across a bug (I would assume the former is more likely...
<br>> ;P):<br>><br>> (require (lib "7.ss" "srfi"))<br>> (program (requires srfi-9)<br>> (feature-cond<br>> (else (define y 6)))) ; should unconditionally provide the
<br>> feature<br>> y ; expects 6<br>> ; but results in error:<br>> ; program: bad syntax in: (program (define y 6))<br>><br>> Looking at program.ss it shows the following syntax-case:<br>><br>> ((_
<br>> (feature-cond (else stuff ...))<br>> more ...)<br>> (syntax<br>> (program<br>> stuff ...<br>> more ...)))<br>><br>> Shouldn't this be expanded to<br>>
<br>> (syntax<br>> (begin<br>> stuff ...<br>> (program more ...)))<br>><br>> ?<br>><br>> Thanks,<br>> yinso<br>><br><br></blockquote></div><br>