From 4b71c8283e44426859c74b0eb08e59d6c6b3b783 Mon Sep 17 00:00:00 2001
From: Chris Hanson <org/chris-hanson/cph>
Date: Tue, 27 Feb 2018 22:27:22 -0800
Subject: [PATCH] Add weak-pair support to equal?.

---
 src/runtime/equals.scm  | 4 ++++
 src/runtime/runtime.pkg | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/src/runtime/equals.scm b/src/runtime/equals.scm
index 6a738d696..b407177cb 100644
--- a/src/runtime/equals.scm
+++ b/src/runtime/equals.scm
@@ -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)
diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg
index 8c7bf7cce..778019633 100644
--- a/src/runtime/runtime.pkg
+++ b/src/runtime/runtime.pkg
@@ -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)
-- 
2.25.1