lexi-lambda / racket-r7rs

An implementation of R7RS in Racket
97 stars 14 forks source link

`guard` does not recognize `else` #15

Closed doug719 closed 2 years ago

doug719 commented 3 years ago

Some small problems with racket8.1 [cs] with r7rs. Using Linux Mint 20.

  1. (display (apply values '(1 2 3))) gives error
  2. else not recognized in guard statement
  3. guard does not handle zero divisor

Regards, Doug

lexi-lambda commented 2 years ago
  1. I don’t believe the behavior of (display (apply values '(1 2 3))) is specified in the report, so I do not think raising an error is a bug. Please correct me if I’m wrong about this.

  2. I agree that this is a bug and should be fixed.

  3. I’m not sure what you mean by this. Could you give an example of a program that you think should behave differently?

lexi-lambda commented 2 years ago

Actually, I take back what I said about point (2), because as far as I can tell, guard does recognize else:

> (guard (condition
          (else 'else))
    (raise #t))
else

So I’m going to close all of these as “not a bug”, but do feel free to reopen or open another issue if you have more information.