[plt-scheme] Interaction of contract library and WebIt

From: Benderjg2 at aol.com (Benderjg2 at aol.com)
Date: Sat Dec 17 14:15:18 EST 2005

Hi Noel,

> Just fixed a fun bug where the contract library's ->
> operator was conflicting with WebIt's use of the same in
> pattern matching.  Methinks this is some macro problem,
> probably triggered by lack of hygiene.  My usual technique
> when faced with macro problems of this sort is to flail
> around wildly and then post to plt-scheme.  I thought I'd
> skip the first step this time.
The code in WebIt! tests for the -> identifier in the syntax-case
implementation of xml-match by including -> in the literal-identifiers
list, as in:
>    (syntax-case lst (unquote ->)
>       ...snip...
>       [(unquote [cata -> cvar ...])
>       ...snip...

Changing the matching of the -> identifier to test using symbol
equality seems to fix the conflict with the contract library. In 
point of fact, I seem to recall being advised in the past, that for 
identifiers which appear in an expression position, I should test with 
module-identifier=?, but that for cases such as -> above, which
is _not_ in an expression position, symbol equality should be
used for this test.

Unless there are recommendations to the contrary, I will publish 
an updated version of webit on Monday (both on my web site and 
via a new submission to planet)--using symbol equality for this test.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20051217/585d1b23/attachment.html>

Posted on the users mailing list.