Add back guarantee since it's needed for compiling svm.
authorChris Hanson <org/chris-hanson/cph>
Mon, 15 Oct 2018 04:54:12 +0000 (21:54 -0700)
committerChris Hanson <org/chris-hanson/cph>
Mon, 15 Oct 2018 04:54:12 +0000 (21:54 -0700)
src/runtime/host-adapter.scm

index e7d28a1f29c4dfd4af11ab1cf01cafe5a1d7be79..0c32242fd3618d29be55f8e8b2384fbe70ec5441 100644 (file)
@@ -41,6 +41,20 @@ USA.
     (eq? 'unbound (environment-reference-type env name)))
 
   (let ((env (->environment '())))
+
+    (if (unbound? env 'guarantee)
+       (eval `(define (guarantee predicate object #!optional caller)
+                (if (predicate object)
+                    object
+                    (error:wrong-type-argument
+                     object
+                     (string-append "object satisfying "
+                                    (call-with-output-string
+                                      (lambda (port)
+                                        (write predicate port))))
+                     caller)))
+             env))
+
     (if (unbound? env 'bundle)
        (eval '(define-syntax bundle
                 (syntax-rules ()