[r6rs-discuss] [Scheme-reports] [scheme-reports] Scheme pattern matching & R*RS

Jim Wise jwise at draga.com
Fri Jan 21 12:26:06 EST 2011


Andre van Tonder <andre at het.brown.edu> writes:

> On Fri, 21 Jan 2011, Jim Wise wrote:
>
>> John Cowan's suggestion of naming the module-provided forms of
>> these such that they override the corresponding core forms on import (by
>> default) seems a good compromise
>
> Just note, FWIW, that R6RS library semantics have no such thing as
> "overriding". You would need to do a complicated EXCEPT import to exclude
> the usual WG1 meanings.

Actually, (prefix ...) is both safer than (except ..._) (a particular
implementation may have additional forms in the library beyond what's
required by WG2), and simpler to use:

       (import (prefix (rnrs match) match:))

alternately, if you only want the `match' form (the only form in the
(rnrs match) library that does not override a core form), you could do:

      (import (only (rnrs match) match))

However, I think the details of library/module imports and exports are
on the table for R7RS; not sure if I remember that correctly.

-- 
				Jim Wise
				jwise at draga.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 192 bytes
Desc: not available
Url : http://lists.r6rs.org/pipermail/r6rs-discuss/attachments/20110121/74b8287b/attachment.pgp 


More information about the r6rs-discuss mailing list