On Wed, 2021-03-24 at 20:59 -0700, Chris Marusich wrote: > [..] > > In guix/import/print.scm, package->code generates the code by invoking > (origin-method source) to get the origin's "method", and then invoking > (procedure-name method) on the method thus obtained. It seems that > procedure-name returns the name "url-fetch*" (the name used privately in > the (guix download) module), but it should be returning the name > "url-fetch" (the public name exported by the (guix download) module). > > I wonder if there is any way to get the public name of the procedure > programmatically, instead of the private one? I believe there isn't, and I have spent some time around Guile's module system. Note that one could do ... (define-module (mod) #:export (x y z)) (define (fun) 'stuff) (define x fun) (define y fun (define z fun) ... in which case there would be more than one "public name". However, there's a possible work-around. It is change the procedure name of a procedure, with the following (define name (let ((visible-name (lambda () 'stuff))) visible-name)) (procedure-name name) ; -> visible-name Patch attached (though written against a somewhat outdated tree). Does this patch fixes the issue? (I'm not in the loop.) Greetings, Maxime.