seanjensengrey / mosh-scheme

Automatically exported from code.google.com/p/mosh-scheme
Other
0 stars 0 forks source link

macro expansion error (maybe) #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create the program:

(import (rnrs))

(define-syntax check
  (syntax-rules (=>)
    ((_ ?expr => ?expected-result)
     (check ?expr (=> equal?) ?expected-result))

    ((_ ?expr (=> ?equal) ?expected-result)
     (let ((result  ?expr)
       (expected    ?expected-result))
       (when (not (?equal result expected))
     (display "Failed test: \n")
     (write (quote ?expr))(newline)
     (display "\tresult was: ")
     (write result)(newline)
     (display "\texpected: ")
     (write expected)(newline))))))

(check +1i => +1i)
(check +1i => +2i)
(check +1i (=> =) +1i)
(check +1i (=> =) +2i)

2. Run it.

What is the expected output? What do you see instead?
Ikarus, Ypsilon and Larceny output the correct:

Failed test: 
0+1i
    result was: 0+1i
    expected: 0+2i
Failed test: 
0+1i
    result was: 0+1i
    expected: 0+2i

but Mosh complains:

 Condition components:
 1. &assertion
 2. &who             who: "=="
 3. &message         message: "number required required, but got (+1i +1i)"
 4. &irritants       irritants: ()

 Exception:
     error in raise: returned from non-continuable exception

 Stack trace:
    1. throw: <subr>
    2. (raise c):  compiler-with-library.scm:894
    3. eval: <subr>
    4. (dynamic-wind in body out):  compiler-with-library.scm:813
    5. (dynamic-wind in body out):  compiler-with-library.scm:813
    6. (dynamic-wind in body out):  compiler-with-library.scm:813
    7. (<top-level>): <unknown location>

What version of the product are you using? On what operating system?
Mosh revision 2001. i686-pc-linux-gnu.

Original issue reported on code.google.com by mrc....@gmail.com on 15 Aug 2009 at 4:15

GoogleCodeExporter commented 9 years ago
Still here with Mosh revision 2032.

Original comment by mrc....@gmail.com on 15 Aug 2009 at 4:38

GoogleCodeExporter commented 9 years ago

Original comment by hige...@gmail.com on 16 Aug 2009 at 4:55

GoogleCodeExporter commented 9 years ago
Fixed on revision 2041.
Thank you.

Original comment by hige...@gmail.com on 17 Aug 2009 at 8:59