Add weak-pair support to equal?.
authorChris Hanson <org/chris-hanson/cph>
Wed, 28 Feb 2018 06:27:22 +0000 (22:27 -0800)
committerChris Hanson <org/chris-hanson/cph>
Wed, 28 Feb 2018 06:27:22 +0000 (22:27 -0800)
src/runtime/equals.scm
src/runtime/runtime.pkg

index 6a738d696a6aed109a261f95fb27f4cb0fad204d..b407177cbd1b6fb84384806714bdc869d62523d6 100644 (file)
@@ -62,6 +62,10 @@ USA.
            ((string? x)
             (and (string? y)
                  (string=? x y)))
+           ((weak-pair? x)
+            (and (weak-pair? y)
+                 (equal? (%weak-car x) (%weak-car y))
+                 (equal? (weak-cdr x) (weak-cdr y))))
            ((cell? x)
             (and (cell? y)
                  (equal? (cell-contents x)
index 8c7bf7cce44681cc90288261a786b4caca0ee68f..77801963314931dc52e7391b3e89a59ae4d336da 100644 (file)
@@ -207,6 +207,8 @@ USA.
          add-boot-init!
          defer-boot-action
          run-deferred-boot-actions)
+  (export (runtime equality)
+         %weak-car)
   (export (runtime predicate)
          set-predicate-tag!)
   (export (runtime rep)