From 2f9e993603f85454b503d6088acc04fa2b257319 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Wed, 28 Apr 2010 22:44:41 +0200 Subject: [PATCH] Rewrite SUBTYPEP so that it ignores recursive type declarations using CONS --- src/lsp/predlib.lsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lsp/predlib.lsp b/src/lsp/predlib.lsp index ab7d09ab1..33eb49457 100644 --- a/src/lsp/predlib.lsp +++ b/src/lsp/predlib.lsp @@ -1090,6 +1090,11 @@ if not possible." ;; are strictly supported. ;; (defun register-cons-type (&optional (car-type '*) (cdr-type '*)) + ;; The problem with the code below is that it does not suport infinite + ;; recursion. Instead we just canonicalize everything to CONS, irrespective + ;; of whether the arguments are valid types or not! + (canonical-type 'CONS) + #+(or) (let ((car-tag (if (eq car-type '*) -1 (canonical-type car-type))) (cdr-tag (if (eq cdr-type '*) -1 (canonical-type cdr-type)))) (cond ((or (zerop car-tag) (zerop cdr-tag))