[Larceny-users] Undefined binding not detected, uses it somehow
Derick Eddington
derick.eddington at gmail.com
Wed Mar 18 00:35:42 EDT 2009
I realized this probably isn't a bug. It's evaluating the call to
assertion-violation before the reference to unless. I usually realize
sooner when this is happening. Sorry. I've been getting used to
libraries and programs which detect unbound identifiers sooner.
P.S. I can't find the part(s) of R6RS which talk about procedure call
sub-expressions evaluation order (i.e., that it's unspecified); where is
it? Thanks.
--
: Derick
----------------------------------------------------------------
On Tue, 2009-03-17 at 16:08 -0700, Derick Eddington wrote:
> Larceny v0.97a4 (alpha test) (Mar 17 2009 11:29:20, precise:Linux:unified)
> larceny.heap, built on Tue Mar 17 11:33:15 PDT 2009
> ERR5RS mode (no libraries have been imported)
>
> > (import (rnrs base))
>
> > (define (f x)
> (unless (number? x)
> (assertion-violation 'f "not a number" x))
> (- x))
>
> > (f 1)
>
>
> Error: unhandled condition:
> Compound condition has these components:
> #<record &assertion>
> #<record &who>
> who : f
> #<record &message>
> message : "not a number"
> #<record &irritants>
> irritants : (1)
>
> Entering debugger; type "?" for help.
> debug> q
>
> > (number? 1)
> #t
>
> > (unless (number? 1) 'blah)
>
>
> Error: Undefined global variable "unless".
> Entering debugger; type "?" for help.
> debug>
>
More information about the Larceny-users
mailing list