[racket] SRFI-34's guard

From: 亀田馬志 (masashi.kameda at gmail.com)
Date: Fri Jan 31 19:18:24 EST 2014

Thanks for telling me.

This time, I'd just given up and I used Racket's with-handlers for my
brainf*ck interpreter.

Thanx.


2014-01-31 Matthew Flatt <mflatt at cs.utah.edu>:

> The SRFI-34 port is old and was defined to recognize `else` as an
> unbound identifier, compatible with the old `mzscheme` language.
>
> I've pushed a repair to make `srfi/34` work with `racket` (but
> maintaining backward compatibility, too).
>
> Meanwhile, you can work around the problem by using `#t` instead of
> `else` (as you probably already realize).
>
> Thanks for the report!
>
> At Wed, 29 Jan 2014 00:20:14 +0900, 亀田馬志 wrote:
> > Hello.
> >
> > I'd like to use SRFI-34 on Racket, but it says else is not allowed
> > eventhough I copied and paseted sample codes stated in SRFI-34.
> >
> > > (require srfi/34)
> > > (guard (condition
> >          (else
> >           (display "condition: ")
> >           (write condition)
> >           (newline)
> >           'exception))
> >   (+ 1 (raise 'an-error)))
> > . else: not allowed as an expression in: else
> > > (guard (condition
> >          (else
> >           (display "something went wrong")
> >           (newline)
> >           'dont-care))
> >  (+ 1 (raise 'an-error)))
> > . else: not allowed as an expression in: else
> > >
> >
> > Is there any reason I couldn't use 'else'?
> >
> > Thanx.
> > ____________________
> >   Racket Users list:
> >   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140201/230ccbe0/attachment-0001.html>

Posted on the users mailing list.