chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] fix subtype check for fixed-size list/vector t


From: Felix
Subject: [Chicken-hackers] [PATCH] fix subtype check for fixed-size list/vector types in scrutinizer
Date: Mon, 31 Oct 2011 10:43:10 +0100 (CET)

The attached patch fixes incorrect (nonexistent) handling of "(list ...)"
and "(vector ...)" types in the subtype-check procedure ("type<=?") in the
scrutinizer.
>From e015072e1fe36f014d1cda33fee319ba4810cd82 Mon Sep 17 00:00:00 2001
From: felix <address@hidden>
Date: Mon, 31 Oct 2011 10:41:36 +0100
Subject: [PATCH] fix subtype-check for fixed-size list and vector types

---
 scrutinizer.scm |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scrutinizer.scm b/scrutinizer.scm
index a04220a..0ea88eb 100755
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -1467,6 +1467,9 @@
                                   (lambda (t) (test t t2))))
                                 ((vector-of list-of) (test (second t1) (second 
t2)))
                                 ((pair) (every test (cdr t1) (cdr t2)))
+                                ((list vector)
+                                 (and (= (length t1) (length t2))
+                                      (every test (cdr t1) (cdr t2))))
                                 ((procedure)
                                  (let ((args1 (if (named? t1) (caddr t1) (cadr 
t1)))
                                        (args2 (if (named? t2) (caddr t2) (cadr 
t2)))
-- 
1.6.0.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]