This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Module-export and letrec


letrec is used in Kawa for tail-recursive procs (for understandable
reasons).

The only trouble is that you can't export a name proc from inside a
letrec. Because you can't do that you have to go to the trouble of
having an external definition that you assign to the letrec defined
proc that you want to export, like this:


(module-export someproc)

(define someproc #!null)

(letrec
  ((hiddenproc
     (lambda (x)
       (if (eqv? x 1)
           1
            (hiddenproc x-1)))))
   (set! someproc hiddenproc))


This is inconvienant at best. Does anyone else think that Kawa should
allow exports from letrecs?


Nic


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]