[racket] SRFI-34's guard

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jan 31 09:07:01 EST 2014

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


Posted on the users mailing list.