On Fri, Nov 2, 2018 at 2:35 PM Mikael Djurfeldt <mik...@djurfeldt.com>
wrote:

> Given this situation, is there still a way to use the module system to
> give (ice-9 match) $ precedence? There is. Göran Weinholt has pointed out
> that other Scheme implementations tend to export their auxilliary keywords.
> If we export $ like this:
>
> --8<---------------cut here---------------start------------->8---
> (define-module (ice-9 match)
>   #:export (match
>                [...]
>
              match-letrec)
>   #:replace ($))
> [...]
> --8<---------------cut here---------------start------------->8---
>
> then (ice-9 match) will gracefully replace $ in (value-history) and match
> will work as expected. A good idea would be to define *all* auxilliary
> keywords to `misplaced' above, according to what Göran has said. That is
> independent of the issue of name collisions.
>

Just to avoid misunderstanding. Of course, to avoid the hard-to-find bugs
which Göran talked about, auxilliary keywords should be exported the normal
way (through export). That way name collisions will be reported. Possibly
that is what we should do here as well, also for $, such that there is a
warning when (ice-9 match) is imported.

Also, what we really wanted to say is not that (ice-9 match) $ is
"replacing". We rather wanted to say that (value-history) $ is "deferring",
but there is no way to do that in the module system right now.

Reply via email to