From d8fecc4ca49a23b5dbdf7b544190dfa704b0701b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 18 Apr 2018 21:21:04 -0700 Subject: [PATCH] Override definition of filter so that compilation using 9.2 works. --- src/runtime/host-adapter.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/runtime/host-adapter.scm b/src/runtime/host-adapter.scm index b4d620370..73066297d 100644 --- a/src/runtime/host-adapter.scm +++ b/src/runtime/host-adapter.scm @@ -188,6 +188,16 @@ USA. (link-variables system-global-environment 'microcode-type env 'microcode-type)))) + (let ((env (->environment '(runtime srfi-1)))) + (if (let ((items '(-1 -2))) + (eq? items (filter negative? items))) + (eval '(define (filter pred lis) + (let recur ((lis lis)) + (cond ((null-list? lis 'filter) lis) + ((pred (car lis)) (cons (car lis) (recur (cdr lis)))) + (else (recur (cdr lis)))))) + env))) + (let ((env (->environment '(runtime syntax)))) (provide-rename env 'compile-item/expression 'compile-expr-item) (if (unbound? env 'expr-item) -- 2.25.1