guard should allow definitions in its body

Bug #313317 reported by Marco Maggi
2
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

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in 1736 (required deleting 3 characters). Thanks.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Low
milestone: none → 0.0.4
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.