From: Chris Hanson Date: Thu, 19 Apr 2018 04:21:04 +0000 (-0700) Subject: Override definition of filter so that compilation using 9.2 works. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~124 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d8fecc4ca49a23b5dbdf7b544190dfa704b0701b;p=mit-scheme.git Override definition of filter so that compilation using 9.2 works. --- 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)