guard should allow definitions in its body
Bug #313317 reported by
Marco Maggi
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
Low
|
Abdulaziz Ghuloum |
Bug Description
Quoting from comp.lang.scheme:
From: William D Clinger
Subject: Re: definitions in the body of GUARD
Marco Maggi wrote:
> Ypsilon and Larceny allow definitions in the
> body of a GUARD...while Ikarus and Mosh disallow them.
If so, then that's a (minor) bug in Ikarus and Mosh.
> R6RS says nothing explicitly.
Untrue. R6RS library section 7.1 says the syntax for
guard is
(guard (<variable>
<cond clause> <cond clause> ...)
<body>)
R6RS section 11.3 says the syntax for <body> is
<definition> ... <expression> <expression> ...
So definitions are definitely allowed in the body
of a guard.
Related branches
To post a comment you must log in.
Fixed in 1736 (required deleting 3 characters). Thanks.