chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] Redefinition of imported bindings


From: Dan Leslie
Subject: [Chicken-hackers] Redefinition of imported bindings
Date: Sat, 31 Jan 2015 21:28:26 -0800

There's one major hurdle left for the first release of geiser support
for Chicken, AFAICT. In short: geiser supports the redefinition of
bindings under virtually any reasonable context; the idea is that
writing modules should be no different than writing applications.

Most of the module support is in now; though it relies heavily on a
variety of ## functions that it probably shouldn't. The remaining case
to cover is essentially the following:

    #;1> (module foo * (import chicken scheme) (define bar 1))
    ; loading /home/dleslie/local/lib/chicken/7/chicken.import.so ...
    #;2> ,m foo
    ; switching current module to `foo'
    #;foo:2> (define bar 2)
    
    Warning: redefinition of imported value binding: bar
    
    Note: assignment to imported value binding: bar
    #;foo:3> ,m #f
    ; resetting current module to toplevel
    #;3> foo#bar  
    1

Ideally, I would expect the final expression to evaluate to "2" and not
"1". After examining modules.scm it is not immediately clear to me how
to go about supporting this. Any thoughts?

Thanks!
-Dan

-- 
-Dan Leslie



reply via email to

[Prev in Thread] Current Thread [Next in Thread]