Redefine MATCH-CASE in terms of MATCHING
authorpix@kepibu.org
local dateFri, 15 Jan 2010 08:55:05
dateFri, 15 Jan 2010 08:55:05
hash20100115085505-50f04-c87fbb3746ad52a69cdf8177e0cd368971188f4b.gz
Redefine MATCH-CASE in terms of MATCHING

This both greatly simplifies the MATCH-CASE macro as well as its expansion.

HOWEVER, this version is *NOT* 100% compatible with the previous version.
Specifically, UNIFICATION-FAILUREs signalled from within clause-forms will /not/
cause the next unification clause to be attempted, but will instead propogate
outward as the -case name suggests they should.

That is,
(ignore-errors
(match-case ("foo")
("foo" (error 'unification-failure ...))
(t :default)))
=> :default ;; before patch
=> nil, #<unification-failure> ;; after patch
1 file(s) changed:
match-block.lisp +10 -37