On Sun, 2009-12-27 at 09:19 +0200, leppie wrote:
> Both 1.1 and 1.3 should give errors.

Not necessarily.

> R6RS says the continuation of a letrec/letrec* binding's initialization may 
> only return once.

It does say that, but it also says that "implementations may or may not
detect that the continuation of each <init> is invoked more than once".
So, if an implementation does not detect, and it's permitted not to,
then an exception won't be raised.

> I know Ikarus has/had some issues with this check/requirement.

I think you're thinking of the other issue about detecting references to
a <variable> during the evaluation of an <init> expression, which is
required to be detected, and Ikarus does not currently detect.  This is
already reported at [1].

> IIRC, Ypsilon has an option to toggle this behaviour.

What option is that?  I've only known about:

$ ypsilon
Ypsilon 0.9.6-trunk/r503 Copyright (c) 2009 Y.Fujita, LittleWing Company 
Limited.
> (letrec ((x (list x))) x)

error: binding construct attempt to reference uninitialized variable, use 
'--warning' to perform expansion time check

backtrace:
  0  (list x)
  ..."/dev/stdin" line 1

> 
$ ypsilon --warning
Ypsilon 0.9.6-trunk/r503 Copyright (c) 2009 Y.Fujita, LittleWing Company 
Limited.
> (letrec ((x (list x))) x)

warning: binding construct may attempt to reference uninitialized variable x
  >  (letrec* ((x (list x))) x)
  ..."/dev/stdin" line 1
  >  (list x)
  ..."/dev/stdin" line 1

error: binding construct attempt to reference uninitialized variable, check 
warning messages

backtrace:
  0  (list x)
  ..."/dev/stdin" line 1

> 


[1] https://bugs.launchpad.net/ikarus/+bug/216832

-- 
: Derick
----------------------------------------------------------------

Reply via email to