I can add a credit for Paul if he would like.
-------- Original Message --------
Subject: [cl-kanren-trs-cvs] r5 - cl-kanren-trs
Date: Thu, 23 Feb 2012 17:12:29 -0800
From: mswank@common-lisp.net
To: cl-kanren-trs-cvs@common-lisp.net


Author: mswank
Date: Thu Feb 23 17:12:29 2012
New Revision: 5

Log:
Update defconst to work with recent sbcl.

Modified:
   cl-kanren-trs/kanren.lisp

Modified: cl-kanren-trs/kanren.lisp
==============================================================================
--- cl-kanren-trs/kanren.lisp	Thu Jun 19 23:15:28 2008	(r4)
+++ cl-kanren-trs/kanren.lisp	Thu Feb 23 17:12:29 2012	(r5)
@@ -29,11 +29,10 @@
 (common-lisp:in-package :kanren-trs)
 
 (defmacro defconst (name value &optional (documentation nil docp))
-  `(eval-when (:execute :load-toplevel :compile-toplevel)
-     (unless (boundp ',name)
-       ,(if docp
-            `(defconstant ,name ,value ,documentation)
-            `(defconstant ,name ,value)))))
+  (let ((global (intern (format nil "%%~A" (symbol-name name)))))
+    `(progn
+       (defvar ,global ,value ,@(and docp `(,documentation)))
+       (define-symbol-macro ,name (load-time-value ,global t)))))
 
 ;;;A -> stream
 (defmacro unit (a) a)

_______________________________________________
cl-kanren-trs-cvs mailing list
cl-kanren-trs-cvs@common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-kanren-trs-cvs