[cl-unification-devel] MATCH* Patch Updates

Pixel // pinterface pinterface at gmail.com
Sat Feb 6 05:54:32 UTC 2010


Greetings all!  Well, Marco, at any rate.  =)  I've pushed a few more
patches to my darcs repo[1].

The most notable changes:
1. MATCH, MATCHF, MATCHING, MATCH-CASE, and MATCHF-CASE are all expanded by
   a single, unified function.  Because it was trivial, I also added
   MATCH-COND, MATCHF-COND, MATCH-ECASE, and MATCHF-ECASE.
2. Documentation is, rather than being duplicated by hand, set per macro
   group.  So MATCH and MATCHF share a single docstring; as do MATCH-COND,
   MATCHF-COND, and MATCHING; as do the -CASE macros.  It seemed
   preferable to the possibility of copy-paste errors.
3. An (enable-template-reader) macro now exists, to selectively enable the
   template reader macro.  This is handy in case of conflicts with other
   reader macros on #T (e.g., closure-html's).
4. If named-readtables is also loaded, creates a named readtable
   unify:template-reader.  (in-readtable ...) is a beautiful thing.

In spite of the extra control-flow macros, 1 and 2 ended up making
match-block.lisp shorter than the version in CVS.  Of course, that comes at
the cost of the internal %match-expander function being hairy enough to
warrant a 45-line docstring explaining the interaction between its
arguments.  ... I'll see about simplifying that. :)

Still needs more tests, but it should be getting closer.

[1] http://repo.kepibu.org/cl-unification/





More information about the cl-unification-devel mailing list