I want to propose another interface:

(my-provide
  #:default + - *
  #:override
  [my-+ +])

which expands to:

(provide - *)
(provide (rename-out [my-+ +]))

and checks that + must be in the #:default section (because we are
overriding it, it’d better already exist).

More generally:

(my-provide
  #:default <ids> ...
  #:override
  [<lhs> <rhs>] ...)

expands to:

(provide (rename-out [<lhs> <rhs>] ...))
(provide <ids*> ...)

where ids* = ids - rhs, and with a check that rhs ⊆ ids
On Thu, Sep 3, 2020 at 10:12 AM Shriram Krishnamurthi <s...@cs.brown.edu>
wrote:

> Ah, I see, that's a nice idea!
>
> One problem is have well over a dozen of these that I want to
> pass-through, but I suppose I could write a
>
> (rename-prefix <prefix> <name> ...)
>
> that turns into a bunch of define's. I'd have to be careful to not miss
> any.
>
> Another issue is that I have to redefine some of the language-definition
> primitives (like #%app), which will definitely make the module far more
> tricky.
>
> --
> 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/CAJUf2yQY-RVM%2BsH8%2BnHzFJFPwm5p5%3DGq%2BHGj42Ao7QQ0wJqnrQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/racket-users/CAJUf2yQY-RVM%2BsH8%2BnHzFJFPwm5p5%3DGq%2BHGj42Ao7QQ0wJqnrQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CADcuegvFaeSFFQspm8NwLsxbR3Bb-PYzwE4q0B5vwH%2B%3DVxBjxw%40mail.gmail.com.

Reply via email to