Subject: bug#18646: closed (Re: bug#18646: procedure-name bug)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 22 Jun 2016 08:20:01 +0000

Your bug report

#18646: procedure-name fails for inner procedures with primitive-eval

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
18646: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18646
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#18646: procedure-name bug
From: Andy Wingo <[email-masked]>
To: Marko Rauhamaa <[email-masked]>
Cc: [email-masked]
Date: Wed, 22 Jun 2016 10:19:47 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Thanks for the report.

For what it's worth this is fixed in Guile master (2.1.x, will be 2.2,
Real Soon Now).

It's a little hard to fix in 2.0 though.  We would have to rewrite some
pieces of the evaluator and the "memoizer", a part of Guile's
interpreter.  (Guile 2.2 already has these rewrites but it can't be
ported back.)  I don't think I will have time to do this, sadly.

I am closing this one based on the guess that I don't think we will get
to this in 2.0, though I would be happy to accept a fix if someone found
a way to do it :)  Please re-open or file a new bug if you or someone
you know will be able to work on a fix for 2.0.

Andy

On Mon 06 Oct 2014 21:04, Marko Rauhamaa <[email-masked]> writes:

> Consider this program (guile-2.0.11 under Fedora 20):
>
> ===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
>    $ 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
>
>
> Marko

Subject: procedure-name bug
From: Marko Rauhamaa <[email-masked]>
To: [email-masked]
Date: Mon, 06 Oct 2014 22:04:41 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Consider this program (guile-2.0.11 under Fedora 20):

===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
   $ 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

Marko