<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>I’m trying to find a match library
for r6rs. Using the match library from mzlib didn’t work.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Following program worked for r5rs:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>(module match-testing mzscheme <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> (require (lib
"plt-match.ss" "mzlib"))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> (match '(1 2 1)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> ((list a b a) (display
"foo")))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> )<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Trying to write it in r6rs leads to an
error message:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>#!r6rs<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>(library (match-test)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
(export)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
(import (rnrs)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
(mzlib plt-match)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
(match '(1 2 1)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
((list a b a) (display
"foo")))<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>match: no matching clause for {1 2 1}<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I also tried mzscheme/match or scheme/match
with the same results. I don’t even know, if they are the same library.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>In the Ikarus code I also found a match
library that was ported to r6rs. But using this library with DrScheme leads to
following error message:<o:p></o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-US>match.ss:377:6:
compile: bad syntax; function application is not allowed, because no #%app
syntax transformer is bound<o:p></o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-US>Now, I can’t
see any solution. <o:p></o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-US>Thanks. Stefan
Ballnat<o:p></o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal style='text-align:justify'><span lang=EN-US>PS: I’m
using DrScheme 3.99.0.24. <o:p></o:p></span></p>
</div>
</body>
</html>