Thanks Chongkai for the suggestion.<br><br>Looking at the doc it can only do conditional expansion based on availability of srfi-x, so I would probably have to try to hack my own solution based on the design. <br><br>On the other hand, I seem to either have a misunderstanding of the SRFI or come across a bug (I would assume the former is more likely... ;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 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><div><span class="gmail_quote">
On 6/5/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;">
According to <a href="http://srfi.schemers.org/srfi-implementers.html">http://srfi.schemers.org/srfi-implementers.html</a>, PLT doesn't support SRFI 0. You can try SRFI 7 instead.<br><br>Chongkai<br><br>----- Original Message -----
<br>From: YC<br>To: PLT Scheme Mailing List<br>Sent: Tuesday, June 05, 2007 4:56 PM<br>Subject: [plt-scheme] srfi 0 or conditonal expansion<br><br><br>Hi all -<br><br>quick question:<br><br>it seems like SRFI 0 is not part of the distro, so what is the correct way to do conditional expansion based on defined/available feature, or is it frowned upon?
<br><br>Thanks,<br>yinso<br><br></blockquote></div><br>