On Nov 10, 2005, at 3:56 AM, Peter Julian Marstrand Mechlenborg wrote:
Hi
I have gotten cl-unification from CVS: [goblin:~/.asdf-install-dir/site]$cvs -z3 -d :pserver:anonymous:anonymous@common-lisp.net:/project/cl-unification/ cvsroot co cl-unification
and I have used SBCL 0.9.6 and clisp-2.33.2.
First some notes.
- The macro match-case is not exported. Is this correct?.
Yep. I need to get back to work on this.
I think this code snippet in match-case:
... (otherwise-claus (if otherwise-clause-present-p (first (last clauses)) ...
should be replaced with this:
... (otherwise-clause (if otherwise-clause-present-p `(progn ,@(rest (first (last clauses)))) ...
Otherwise I get the error "the function: otherwise not defined".
Yes. This looks like a bug. Thanks for the report.
I cannot quite help you with the code below. I do not know what BOUND-IDL-CLASSES is and so on. However, I will fix the problems with CL-UNIFICATION ASAP.
Meanwhile, why don't you subscribe to the cl-unification-devel mailing list?
Cheers -- Marco
Here comes my problem.
I have this in a file (unify-problems.lisp):
=Start============
(in-package :unify)
(defun check-bindings (interface-bindings) (match-case (interface-bindings)
((:interface ?interface-name :bindings ?binds) (let ((bound-idl-classes (loop for binding in ?binds collect (match-case (binding) ((:concrete-class ?_
:idl-class ?idl-class-name) ?idl-class-name) ((:concrete-class ?foo :idl-class ?idl-class-name) ?idl-class-name) (otherwise (error "UTILS: Interface binding has wrong format: ~S" binding)))))) bound-idl-classes))
(otherwise (error "UTILS: Interface binding has wrong format: ~S"
interface-bindings))))
#| (check-bindings '(:interface |Set-interface| :bindings ((:concrete-class |SetC| :idl-class |Set|)
(:concrete-class |BigSetC| :idl-class |BigSet|)
(:concrete-class |BigSetC| :idl-class |BigSet|)))) ==> (|Set| |BigSet| |BigSet|)
(check-bindings '(:interface |Set-interface| :bindings ((:concrete-class |SetC| :idl-class |Set|)
(:concrete-class |BigSetC| :idl-class |BigSet|)))) ==> (|Set| |BigSet|)
(check-bindings '(:interface |Set-interface| :bindings ((:concrete-class |SetC| :idl-class |Set|))))
==> (|Set|) |#
=End===============
When compiling the file with C-c-k in Slime I get 3 errors which I don't understand (only in SBCL, in Clisp it's ok). I can compile the function using C-c-c in Slime, but when I test it with the code in the comment above, I run into trouble again. The test only gives the correct result for the first test you run, no matter which one.
Am I doing something stupid, or is this a bug? Hope you can help.
Bye,
-- Peter Mechlenborg
-- Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A.
cl-unification-devel@common-lisp.net