Okay, good.  Thanks for the library recommendation; I'll probably use that
in the future where I need to rename/provide multiple things, but given
that there's only one I did this instead in order to avoid having another
dependency:

(provide do-it)
(define do-it (procedure-rename do-something 'do-i))

I suspect I'm reinventing the wheel and that's what static-rename compiles
down to.


On Tue, Oct 12, 2021 at 3:14 PM 'William J. Bowman' via Racket Users <
racket-users@googlegroups.com> wrote:

> I think this is the expected behaviour of `rename-out`; you might want
> this library to change the dynamic displayed name:
>   https://docs.racket-lang.org/static-rename/index.html
>
> --
> William J. Bowman
>
> On Tue, Oct 12, 2021 at 03:07:13PM -0400, David Storrs wrote:
> > ---------------
> > ; test.rkt
> > #lang racket
> > (define (do-something) "ok")
> > (provide do-something)
> >
> > ; test2.rkt
> > #lang racket
> > (require "test.rkt")
> > (provide (rename-out [do-something do-it]))
> >
> > #lang racket
> > (require "test2.rkt")
> > do-it
> > ---------------
> >
> > The printed value is #<procedure:do-something> although I was expecting
> > #<procedure:do-it>.  Have I done something wrong or simply misunderstood
> > how rename-out works?
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAE8gKodiRBWPK5MfgYnOi_V%2B%3DwwFzBxtQK1qV2Mj-zPuHEXn9g%40mail.gmail.com
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/YWXekUFzaEkaitiB%40williamjbowman.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAE8gKodCGGStB5LW-sw8DNDCeR-G4Zt9UxMsbcCs6mAZUiH%3DMw%40mail.gmail.com.

Reply via email to