<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face="Courier New" size=2>It's a problem with
module-or-top-identifier=? or with the use of it, I think.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>The keyword if is not recognized if it
comes from scheme/base.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>The example does work with #lang
mzscheme.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>It also works with:</FONT></DIV>
<DIV><FONT face="Courier New" size=2>#lang scheme<BR>(require (only-in mzscheme
if))</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>With pretty-big:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>(module x mzscheme<BR> (require (only
mzscheme if))<BR> (require-for-syntax syntax/stx)<BR> (require
syntax/stx)<BR> (define-syntax (x stx)<BR> (syntax-case* stx (if)
module-or-top-identifier=?<BR> ((_ if) #'#t)<BR> ((_
else) #'#f)))<BR> (provide x))<BR>(require 'x)<BR>(x if) ; #t ok<BR>(x 1) ;
#f ok<BR>(require scheme/base)<BR>(x if) ; #f
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<==<BR>(x
1) ; #f ok<BR></FONT></DIV>
<DIV><FONT face="Courier New" size=2>Jos<BR></FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>----- Original Message ----- </FONT>
<DIV><FONT face="Courier New" size=2>From: "Serge Dukhopel" <</FONT><A
href="mailto:dukhopel@gmail.com"><FONT face="Courier New"
size=2>dukhopel@gmail.com</FONT></A><FONT face="Courier New"
size=2>></FONT></DIV>
<DIV><FONT face="Courier New" size=2>To: <</FONT><A
href="mailto:plt-scheme@list.cs.brown.edu"><FONT face="Courier New"
size=2>plt-scheme@list.cs.brown.edu</FONT></A><FONT face="Courier New"
size=2>></FONT></DIV>
<DIV><FONT face="Courier New" size=2>Sent: Tuesday, October 28, 2008 9:56
PM</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Subject: [plt-scheme] srfi/42 filter doen't
work</FONT></DIV></DIV>
<DIV><FONT face="Courier New"><BR><FONT size=2></FONT></FONT></DIV><FONT
face="Courier New" size=2>> Hi, I'm trying to use srfi/42 and found a
problem. Following code<BR>> (it's actually one of the test cases from
srfi/42ref/examples-42.ss)<BR>> <BR>> #lang scheme<BR>> (require
srfi/42)<BR>> (list-ec (:range n 5) (if (even? n)) (:range k (+ n 1)) (list n
k))<BR>> <BR>> produces an error message: "list-ec: <generator> or
<filter> expected,<BR>> got: in: (if (even? n))"<BR>> The same
example but with "or" (as well as "and" and "not") instead of<BR>> "if" works
perfectly:<BR>> <BR>> (list-ec (:range n 5) (or (even? n)) (:range k (+ n
1)) (list n k))<BR>> => ((0 0) (2 0) (2 1) (2 2) (4 0) (4 1) (4 2) (4 3)
(4 4))<BR>> <BR>> It's not blocking me (I can use either "or" or "and"
with the same<BR>> result), but I believe that it's a bug.<BR>> <BR>>
Problem is present at least in versions 4.1, 4.1.1 and today's 4.1.2<BR>>
_________________________________________________<BR>> For list-related
administrative tasks:<BR>> </FONT><A
href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme"><FONT
face="Courier New"
size=2>http://list.cs.brown.edu/mailman/listinfo/plt-scheme</FONT></A><BR><FONT
face="Courier New" size=2>></FONT></BODY></HTML>