Marko Rauhamaa <ma...@pacujo.net> writes:

> Consider this program:
>
> ===begin test.scm=======================================================
> (define (hello) #f)
> (format #t "~S\n" (procedure-name hello))
>
> (define (xyz)
>   (define (hello) #f)
>   (format #t "~S\n" (procedure-name hello)))
>
> (xyz)
> ===end test.scm=========================================================
>
> If I run:
>
>    $ guile --no-auto-compile test.scm
>    hello
>    #f
>    $ guile --no-auto-compile test.scm
>    hello
>    #f

This is expected but not ideal.  Our primitive evaluator does not
preserve non-toplevel variable names, and therefore the associated
procedure names are lost.  Maybe we can fix this in Guile 2.2.

>    $ guile test.scm
>    ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
>    ;;;       or pass the --no-auto-compile argument to disable.
>    [...]
>    hello
>    hello
>    $ guile test.scm
>    hello
>    hello
>    $ guile --no-auto-compile test.scm
>    hello
>    hello

The reason this last one works is because the .go file was created in
the preceding compiled runs, and --no-auto-compile does not inhibit the
use of pre-existing .go files (unless the .scm file is newer, of
course).

     Regards,
       Mark

Reply via email to