[gambit-list] As far as the renaming scheme goes, ...

Bradley Lucier lucier at math.purdue.edu
Wed Mar 19 15:10:12 EDT 2008


Thank you for your reply.

On Mar 19, 2008, at 12:05 AM, Abdulaziz Ghuloum wrote:
> As far as the immutability of the library exports, there is a hook
> for how the output of the run-time components of the library should
> be generated (see build-library-letrec* in psyntax.builders.ss).  In
> ikarus, I generate this library-letrec* form that looks like:
>
>    (library-letrec* ([local-name exported-name expression] ...) body)
>
> A portable implementation would generate:
>
>    (letrec* ([local-name expression] ...)
>      (begin
>        (set! exported-name local-name) ...
>        body))
>
> A gambit-specific generator would add the declarations that you
> mentioned in your message (e.g., (safe) (standard-bindings) ...) and
> shape the output to look in a way that the gambit compiler likes.

The core issue might be that even with (declare (block)) in Gambit,  
when it sees

(define foo 'wait)

(letrec ((bar values))
   (set! foo bar))

it won't treat foo as immutable (because it's just been mutated ;-).

Maybe gambit needs a define-values form or something like it.

Brad



More information about the Gambit-list mailing list