m2ym / optima

Optimized Pattern Matching Library for Common Lisp
271 stars 19 forks source link

XMATCH #2

Open m2ym opened 12 years ago

m2ym commented 12 years ago

We need to consider the following case:

(defstruct btree)
(defstruct (leaf (:include btree))
  value)
(defstruct (node (:include btree))
  left right)
(xmatch (the btree (make-node :left (make-leaf :value 1)
                              :right (make-leaf :value 2)))
  ...)

The problem is that we can't determine the lower bounds of btree should included or excluded. Maybe we will need some extension of type specifier.

m2ym commented 12 years ago

We don't need to care about algebraic data types on optima side. Just derive a variant type on the definition side.

m2ym commented 12 years ago

MULTIPLE-VALUE-XMATCH

m2ym commented 12 years ago

Wontfix