Okay then. The debugger doesn't magically go seppuku on me, but the code still fails to run properly.<br><br>Can someone, ANYONE, point out what mistake I've made? The code seems entirely logical, but the debugger simply skips over it and tells me my code is wrong. I still don't know why.
<br><br><div class="gmail_quote">On Jan 19, 2008 5:43 PM, Ran Gutin <<a href="mailto:manicmessiah@gmail.com">manicmessiah@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Wait. It seems that you're right.<br>I'm running version 371. So I'll update now.<br><br>:) Thanks. I'll update you in how things go.<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Jan 19, 2008 3:57 PM, Gregory Cooper <
<a href="mailto:greg@cs.brown.edu" target="_blank">greg@cs.brown.edu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What version of DrScheme are you running? There was a bug in the v371
<br>debugger that would produce error messages like that, but it should<br>have been fixed in v372 (and in svn as of r7169 I think).<br><div><div></div><div><br>On Jan 19, 2008 10:28 AM, Ran Gutin <<a href="mailto:manicmessiah@gmail.com" target="_blank">
manicmessiah@gmail.com</a>> wrote:<br>> (define (doublequoted-symbol? sym)<br>> (and (pair? sym) (eqv? (car sym) 'quote)))<br>><br>> (define-syntax match<br>> (syntax-rules ()<br>> ((match vars [pfirst prest ...] body ...)
<br>><br>> (cond<br>><br>> ((and (not (doublequoted-symbol? (quote pfirst)))<br>> (symbol? (quote pfirst)))<br>> (let ((pfirst (car vars)))<br>> (match (cdr vars) [prest ...] body ...)))
<br>><br>> ((eqv? pfirst (car vars))<br>> (match (cdr vars) [prest ...] body ...))<br>><br>> (else #f)))<br>><br>> ((match vars [] body ...) (begin body ...))))<br>><br>> (match '(1 2 3) (one 2 three)
<br>> (display three))<br>><br>><br>><br>> Sorry for not commenting on the code, but here's a basic idea of what it<br>> SHOULD do:<br>> (match '(1 2 3) (1 2 3) (display 3)) should match perfectly and display 3 on
<br>> the terminal (it doesn't).<br>> (match '(1 2 3) (one two three) (display 3)) works perfectly, and prints 3.<br>> (match '(1 2 3) ('one 'two 'three) (display 'one)) - This should fail to
<br>> match the pattern altogether, as symbols which are already quoted are<br>> matched for equality, rather than used as identifiers as above. This dies<br>> miserably without returning #f.<br>> (match '(1 2 3) (one 2 three) (display three)) - This should immediately
<br>> create an alias for the values 1 and 3 ('one' and 'three) and match the<br>> second values for equality. Unfortunately, this is not the case.<br>><br>><br>> (match '(1 2 3) (one 2 three)
<br>> (display three))<br>> ... gives the following error:<br>> "let: bad syntax (not an identifier) in: 2"<br>><br>> It seems to be completely ignoring the conditional.<br>> So I performed a test:
<br>> (and (not (doublequoted-symbol? (quote 2)))<br>> (symbol? (quote 2)))<br>> ... actually returns FALSE. So then why is the conditional statement<br>> branching off completely wrong?<br>><br>
> And then, here's the real kill. I can't debug the damn thing.<br>> Doing so sends an alert window flying in my face, and a larger one behind<br>> it.<br>><br>> "rest: expected argument of type <non-empty list>; given ()
<br>><br>> === context ===<br>> C:\Program Files\PLT\collects\mzlib\list.ss:295:2: rest<br>> C:\Program Files\PLT\collects\mztake\debug-tool.ss:804:10: can-step-out?<br>><br>> rest: expected argument of type <non-empty list>; given ()
<br>><br>> === context ===<br>> C:\Program Files\PLT\collects\mzlib\list.ss:295:2: rest<br>> C:\Program Files\PLT\collects\mztake\debug-tool.ss:804:10: can-step-out?<br>><br>> rest: expected argument of type <non-empty list>; given ()
<br>><br>> === context ===<br>> C:\Program Files\PLT\collects\mzlib\list.ss:295:2: rest<br>> C:\Program Files\PLT\collects\mztake\debug-tool.ss:804:10: can-step-out?<br>><br>> rest: expected argument of type <non-empty list>; given ()
<br>><br>> === context ===<br>> C:\Program Files\PLT\collects\mzlib\list.ss:295:2: rest<br>> C:\Program Files\PLT\collects\mztake\debug-tool.ss:804:10: can-step-out?<br>><br>> rest: expected argument of type <non-empty list>; given ()
<br>><br>> === context ===<br>> C:\Program Files\PLT\collects\mzlib\list.ss:295:2: rest<br>> C:\Program Files\PLT\collects\mztake\debug-tool.ss:804:10: can-step-out?<br>><br>> rest: expected argument of type <non-empty list>; given ()
<br>><br>> === context ===<br>> C:\Program Files\PLT\collects\mzlib\list.ss:295:2: rest<br>> C:\Program Files\PLT\collects\mztake\debug-tool.ss:804:10: can-step-out?<br>><br>> rest: expected argument of type <non-empty list>; given ()
<br>><br>> === context ===<br>> C:\Program Files\PLT\collects\mzlib\list.ss:295:2: rest<br>> C:\Program Files\PLT\collects\mztake\debug-tool.ss:804:10: can-step-out?"<br>><br>> ^ Can someone tell me what the hell is going on?
<br>><br></div></div>> _________________________________________________<br>> For list-related administrative tasks:<br>> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-scheme
</a><br>><br>><br></blockquote></div><br>
</div></div></blockquote></div><br>