From 9011a7628852ac5ea9de55fa7652b0bfc5dcfc83 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Wed, 18 Oct 2017 23:35:33 +0200 Subject: [PATCH 2/2] Add (import scheme) and (eval '(import scheme)) everywhere This change is required for when we drop the OBSOLETE part at the end of library.scm For core, it seems like this is required anyway due to -explicit-use, but we may want to reconsider whether requiring an import of "scheme" is really what we want for "eval" in compiled code. It would make more sense to have the default implicit imports work for eval too. --- chicken-ffi-syntax.scm | 3 +- chicken-syntax.scm | 67 +++++++++++--------------- chicken.import.scm | 1 + eval.scm | 2 +- expand.scm | 6 +-- modules.scm | 10 ++-- profiler.scm | 2 +- scheduler.scm | 2 +- tests/c-id-valid.scm | 2 +- tests/embedded2.scm | 2 + tests/library-tests.scm | 2 + tests/scrutiny-tests.scm | 2 + tests/scrutiny.expected | 116 +++++++++++++++++++++++----------------------- tests/syntax-tests.scm | 2 + tests/user-pass-tests.scm | 3 +- 15 files changed, 111 insertions(+), 111 deletions(-) diff --git a/chicken-ffi-syntax.scm b/chicken-ffi-syntax.scm index 69808bf2..19f6ca86 100644 --- a/chicken-ffi-syntax.scm +++ b/chicken-ffi-syntax.scm @@ -39,7 +39,8 @@ (no-bound-checks) (no-procedure-checks)) -(import chicken.base +(import scheme + chicken.base chicken.format chicken.string) diff --git a/chicken-syntax.scm b/chicken-syntax.scm index a2f3c800..9d399a4e 100644 --- a/chicken-syntax.scm +++ b/chicken-syntax.scm @@ -39,7 +39,7 @@ (no-bound-checks) (no-procedure-checks)) -(import chicken) +(import scheme chicken) (include "common-declarations.scm") (include "mini-srfi-1.scm") @@ -50,13 +50,13 @@ (##sys#extend-macro-environment 'handle-exceptions - `((call-with-current-continuation . scheme#call-with-current-continuation)) + `() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'handle-exceptions form '(_ variable _ . _)) (let ((k (r 'k)) (args (r 'args))) - `((,(r 'call-with-current-continuation) + `((,(r 'scheme#call-with-current-continuation) (##core#lambda (,k) (chicken.condition#with-exception-handler @@ -71,15 +71,14 @@ (##sys#extend-macro-environment 'condition-case - `((else . ,(##sys#primitive-alias 'else)) - (memv . scheme#memv)) + `() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'condition-case form '(_ _ . _)) (let ((exvar (r 'exvar)) (kvar (r 'kvar)) (%and (r 'and)) - (%memv (r 'memv)) + (%memv (r 'scheme#memv)) (%else (r 'else))) (define (parse-clause c) (let* ((var (and (symbol? (car c)) (car c))) @@ -613,14 +612,14 @@ (##sys#extend-macro-environment 'nth-value - `((list-ref . scheme#list-ref)) + `() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'nth-value form '(_ _ _)) (let ((v (r 'tmp))) `(##sys#call-with-values (##core#lambda () ,(caddr form)) - (##core#lambda ,v (,(r 'list-ref) ,v ,(cadr form)))))))) + (##core#lambda ,v (,(r 'scheme#list-ref) ,v ,(cadr form)))))))) (##sys#extend-macro-environment 'define-inline '() @@ -742,9 +741,7 @@ (##sys#extend-macro-environment 'let-optionals - `((null? . scheme#null?) - (car . scheme#car) - (cdr . scheme#cdr)) + `() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'let-optionals form '(_ _ . _)) @@ -778,10 +775,10 @@ (if (null? vars) `(,body-proc . ,(reverse non-defaults)) (let ((v (car vars))) - `(##core#if (,(r 'null?) ,rest) + `(##core#if (,(r 'scheme#null?) ,rest) (,(car defaulters) . ,(reverse non-defaults)) - (##core#let ((,v (,(r 'car) ,rest)) ; we use car/cdr, because of rest-list optimization - (,rest (,(r 'cdr) ,rest))) + (##core#let ((,v (,(r 'scheme#car) ,rest)) ; we use car/cdr, because of rest-list optimization + (,rest (,(r 'scheme#cdr) ,rest))) ,(recur (cdr vars) (cdr defaulters) (cons v non-defaults)))))))) @@ -831,17 +828,15 @@ (##sys#extend-macro-environment 'optional - `((null? . scheme#null?) - (car . scheme#car) - (cdr . scheme#cdr) ) + `() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'optional form '(_ _ . #(_ 0 1))) (let ((var (r 'tmp))) `(##core#let ((,var ,(cadr form))) - (##core#if (,(r 'null?) ,var) + (##core#if (,(r 'scheme#null?) ,var) ,(optional (cddr form) #f) - (,(r 'car) ,var))))))) + (,(r 'scheme#car) ,var))))))) ;;; (LET-OPTIONALS* args ((var1 default1) ... [rest]) body1 ...) @@ -859,18 +854,16 @@ (##sys#extend-macro-environment 'let-optionals* - `((null? . scheme#null?) - (car . scheme#car) - (cdr . scheme#cdr)) + `() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'let-optionals* form '(_ _ list . _)) (let ((args (cadr form)) (var/defs (caddr form)) (body (cdddr form)) - (%null? (r 'null?)) - (%car (r 'car)) - (%cdr (r 'cdr))) + (%null? (r 'scheme#null?)) + (%car (r 'scheme#car)) + (%cdr (r 'scheme#cdr))) (let ((rvar (r 'tmp))) `(##core#let ((,rvar ,args)) @@ -894,11 +887,7 @@ (##sys#extend-macro-environment 'case-lambda - `((>= . scheme#>=) - (car . scheme#car) - (cdr . scheme#cdr) - (eq? . scheme#eq?) - (length . scheme#length)) + `() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'case-lambda form '(_ . _)) @@ -915,11 +904,11 @@ (minvars (genvars mincount)) (rvar (r 'rvar)) (lvar (r 'lvar)) - (%>= (r '>=)) - (%eq? (r 'eq?)) - (%car (r 'car)) - (%cdr (r 'cdr)) - (%length (r 'length))) + (%>= (r 'scheme#>=)) + (%eq? (r 'scheme#eq?)) + (%car (r 'scheme#car)) + (%cdr (r 'scheme#cdr)) + (%length (r 'scheme#length))) `(##core#lambda ,(append minvars rvar) (##core#let @@ -1076,12 +1065,12 @@ (##sys#extend-macro-environment 'cut - `((apply . scheme#apply)) + `() (##sys#er-transformer (lambda (form r c) (let ((%<> (r '<>)) (%<...> (r '<...>)) - (%apply (r 'apply))) + (%apply (r 'scheme#apply))) (when (null? (cdr form)) (chicken.syntax#syntax-error 'cut "you need to supply at least a procedure" form)) (let loop ([xs (cdr form)] [vars '()] [vals '()] [rest #f]) @@ -1109,10 +1098,10 @@ (##sys#extend-macro-environment 'cute - `((apply . scheme#apply)) + `() (##sys#er-transformer (lambda (form r c) - (let ((%apply (r 'apply)) + (let ((%apply (r 'scheme#apply)) (%<> (r '<>)) (%<...> (r '<...>))) (when (null? (cdr form)) diff --git a/chicken.import.scm b/chicken.import.scm index 153a521b..7cdb94da 100644 --- a/chicken.import.scm +++ b/chicken.import.scm @@ -25,6 +25,7 @@ ;; OBSOLETE: This can be removed after bootstrapping (needed for ;; macros and constant evaluation in compiler) +(import scheme) (if (not (##sys#symbol-has-toplevel-binding? 'chicken.base#add1)) (begin (set! chicken.base#add1 add1) diff --git a/eval.scm b/eval.scm index 0426e644..f4487f1f 100644 --- a/eval.scm +++ b/eval.scm @@ -1381,7 +1381,7 @@ ;;; Simple invocation API: -(import chicken chicken.eval chicken.load chicken.condition) +(import chicken scheme chicken.eval chicken.load chicken.condition) (declare (hide last-error run-safe store-result store-string diff --git a/expand.scm b/expand.scm index b6c763b6..49ab7ae8 100644 --- a/expand.scm +++ b/expand.scm @@ -962,7 +962,7 @@ ;;; Macro definitions: -(import chicken chicken.blob chicken.syntax chicken.internal) +(import chicken scheme chicken.blob chicken.syntax chicken.internal) (##sys#extend-macro-environment 'import-syntax '() @@ -1399,7 +1399,7 @@ (##sys#extend-macro-environment 'case - '((eqv? . scheme#eqv?)) + '() (##sys#er-transformer (lambda (form r c) (##sys#check-syntax 'case form '(_ _ . #(_ 0))) @@ -1408,7 +1408,7 @@ (let ((tmp (r 'tmp)) (%or (r 'or)) (%=> (r '=>)) - (%eqv? (r 'eqv?)) + (%eqv? (r 'scheme#eqv?)) (%else (r 'else))) `(let ((,tmp ,exp)) ,(let expand ((clauses body) (else? #f)) diff --git a/modules.scm b/modules.scm index 148e8f55..3c4e0e84 100644 --- a/modules.scm +++ b/modules.scm @@ -34,11 +34,6 @@ mark-imported-symbols match-functor-argument merge-se module-indirect-exports module-rename register-undefined)) -(include "common-declarations.scm") -(include "mini-srfi-1.scm") - -(define-syntax d (syntax-rules () ((_ . _) (void)))) - (import scheme chicken.base chicken.internal @@ -46,6 +41,11 @@ chicken.platform chicken.syntax) +(include "common-declarations.scm") +(include "mini-srfi-1.scm") + +(define-syntax d (syntax-rules () ((_ . _) (void)))) + (define-alias dd d) (define-alias dm d) (define-alias dx d) diff --git a/profiler.scm b/profiler.scm index cfc27bdc..bce5a6fc 100644 --- a/profiler.scm +++ b/profiler.scm @@ -31,7 +31,7 @@ (unsafe) (disable-interrupts)) -(import chicken) +(import chicken scheme) (include "common-declarations.scm") diff --git a/scheduler.scm b/scheduler.scm index 72b8ad06..97db8583 100644 --- a/scheduler.scm +++ b/scheduler.scm @@ -133,7 +133,7 @@ inline static void C_fdset_add(int fd, int input, int output) { EOF ) ) -(import chicken chicken.format) +(import chicken scheme chicken.format) (include "common-declarations.scm") diff --git a/tests/c-id-valid.scm b/tests/c-id-valid.scm index 65c811fc..7da4df15 100644 --- a/tests/c-id-valid.scm +++ b/tests/c-id-valid.scm @@ -1,4 +1,4 @@ -(import (chicken compiler support)) +(import scheme (chicken compiler support)) (define +invalid-ids+ '("-foo" diff --git a/tests/embedded2.scm b/tests/embedded2.scm index e7aee2f0..a791ce94 100644 --- a/tests/embedded2.scm +++ b/tests/embedded2.scm @@ -1,5 +1,7 @@ (import gc pretty-print) +(eval '(import scheme)) ;; TODO: Get rid of this? + #> #include diff --git a/tests/library-tests.scm b/tests/library-tests.scm index 0ac5e2be..2f6ca415 100644 --- a/tests/library-tests.scm +++ b/tests/library-tests.scm @@ -660,6 +660,8 @@ A ;;; eval return values +(eval '(import scheme)) ;; TODO: Get rid of this? + (assert (= 1 (eval 1))) (assert (eq? '() (receive (eval '(values))))) (assert (equal? '(1 2 3) (receive (eval '(values 1 2 3))))) diff --git a/tests/scrutiny-tests.scm b/tests/scrutiny-tests.scm index 546c5238..5f02c4c0 100644 --- a/tests/scrutiny-tests.scm +++ b/tests/scrutiny-tests.scm @@ -1,5 +1,7 @@ ;;;; scrutiny-tests.scm +(eval '(import scheme)) ;; TODO: Get rid of this? + (define (a) (define (b) (define (c) diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected index 44afef85..db836107 100644 --- a/tests/scrutiny.expected +++ b/tests/scrutiny.expected @@ -1,5 +1,5 @@ -Warning: (scrutiny-tests.scm:31) - assignment to imported value binding `car' +Warning: (scrutiny-tests.scm:33) - assignment to imported value binding `car' Note: in local procedure `c', in local procedure `b', @@ -19,34 +19,34 @@ Warning: in toplevel procedure `foo': (if x (scheme#values 1 2) (scheme#values 1 2 (scheme#+ (scheme#+ ...)))) Warning: at toplevel: - (scrutiny-tests.scm:19) in procedure call to `bar', expected argument #2 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:21) in procedure call to `bar', expected argument #2 of type `number' but was given an argument of type `symbol' Warning: at toplevel: - (scrutiny-tests.scm:21) in procedure call to `scheme#string?', expected 1 argument but was given 0 arguments + (scrutiny-tests.scm:23) in procedure call to `scheme#string?', expected 1 argument but was given 0 arguments Warning: at toplevel: - (scrutiny-tests.scm:23) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values 1 2))', but received 2 results + (scrutiny-tests.scm:25) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values 1 2))', but received 2 results Warning: at toplevel: - (scrutiny-tests.scm:24) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values))', but received zero results + (scrutiny-tests.scm:26) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values))', but received zero results Warning: at toplevel: - (scrutiny-tests.scm:27) in procedure call to `x', expected a value of type `(procedure () *)' but was given a value of type `fixnum' + (scrutiny-tests.scm:29) in procedure call to `x', expected a value of type `(procedure () *)' but was given a value of type `fixnum' Warning: at toplevel: - (scrutiny-tests.scm:29) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:31) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: at toplevel: - (scrutiny-tests.scm:29) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:31) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' Warning: at toplevel: assignment of value of type `fixnum' to toplevel variable `scheme#car' does not match declared type `(forall (a) (procedure scheme#car ((pair a *)) a))' Warning: at toplevel: - expected a single result in `let' binding of `g19', but received 2 results + expected a single result in `let' binding of `g23', but received 2 results Warning: at toplevel: - in procedure call to `g19', expected a value of type `(procedure () *)' but was given a value of type `fixnum' + in procedure call to `g23', expected a value of type `(procedure () *)' but was given a value of type `fixnum' Note: in toplevel procedure `foo': expected a value of type boolean in conditional, but was given a value of type `(procedure bar () *)' which is always true: @@ -54,34 +54,34 @@ Note: in toplevel procedure `foo': (if bar 3 (##core#undefined)) Warning: in toplevel procedure `foo2': - (scrutiny-tests.scm:58) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number' + (scrutiny-tests.scm:60) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number' Warning: at toplevel: - (scrutiny-tests.scm:66) in procedure call to `foo3', expected argument #1 of type `string' but was given an argument of type `fixnum' + (scrutiny-tests.scm:68) in procedure call to `foo3', expected argument #1 of type `string' but was given an argument of type `fixnum' Warning: in toplevel procedure `foo4': - (scrutiny-tests.scm:71) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:73) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo5': - (scrutiny-tests.scm:77) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:79) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo6': - (scrutiny-tests.scm:83) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:85) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: at toplevel: - (scrutiny-tests.scm:90) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:92) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:104) in procedure call to `foo9', expected argument #1 of type `string' but was given an argument of type `number' + (scrutiny-tests.scm:106) in procedure call to `foo9', expected argument #1 of type `string' but was given an argument of type `number' Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:105) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:107) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string' Note: in toplevel procedure `foo10': expression returns a result of type `string' but is declared to return `pair', which is not compatible Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:109) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `pair' + (scrutiny-tests.scm:111) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `pair' Warning: in toplevel procedure `foo10': expression returns 2 values but is declared to have a single result @@ -90,10 +90,10 @@ Warning: in toplevel procedure `foo10': expression returns zero values but is declared to have a single result of type `*' Warning: in toplevel procedure `foo10': - (scrutiny-tests.scm:112) in procedure call to `scheme#*', expected argument #1 of type `number' but was given an argument of type `string' + (scrutiny-tests.scm:114) in procedure call to `scheme#*', expected argument #1 of type `number' but was given an argument of type `string' Warning: in toplevel procedure `foo#blabla': - (scrutiny-tests.scm:137) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:139) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol' Warning: at toplevel: use of deprecated `deprecated-procedure' @@ -102,114 +102,114 @@ Warning: at toplevel: use of deprecated `another-deprecated-procedure' - consider `replacement-procedure' Warning: at toplevel: - (scrutiny-tests.scm:162) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' + (scrutiny-tests.scm:164) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' Warning: at toplevel: - (scrutiny-tests.scm:163) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' + (scrutiny-tests.scm:165) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)' Note: at toplevel: - (scrutiny-tests.scm:176) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true + (scrutiny-tests.scm:178) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true Note: at toplevel: - (scrutiny-tests.scm:184) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false + (scrutiny-tests.scm:186) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false Note: at toplevel: - (scrutiny-tests.scm:185) in procedure call to `scheme#string?', the predicate is called with an argument of type `(not (or char string))' and will always return false + (scrutiny-tests.scm:187) in procedure call to `scheme#string?', the predicate is called with an argument of type `(not (or char string))' and will always return false Note: at toplevel: - (scrutiny-tests.scm:188) in procedure call to `char-or-string?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests.scm:190) in procedure call to `char-or-string?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests.scm:189) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false + (scrutiny-tests.scm:191) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false Note: at toplevel: - (scrutiny-tests.scm:190) in procedure call to `scheme#string?', the predicate is called with an argument of type `fixnum' and will always return false + (scrutiny-tests.scm:192) in procedure call to `scheme#string?', the predicate is called with an argument of type `fixnum' and will always return false Note: at toplevel: - (scrutiny-tests.scm:194) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `char' and will always return false + (scrutiny-tests.scm:196) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `char' and will always return false Note: at toplevel: - (scrutiny-tests.scm:195) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false + (scrutiny-tests.scm:197) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false Note: at toplevel: - (scrutiny-tests.scm:199) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false + (scrutiny-tests.scm:201) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false Note: at toplevel: - (scrutiny-tests.scm:200) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false + (scrutiny-tests.scm:202) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false Warning: at toplevel: - (scrutiny-tests.scm:204) in procedure call to `f', expected argument #1 of type `pair' but was given an argument of type `null' + (scrutiny-tests.scm:206) in procedure call to `f', expected argument #1 of type `pair' but was given an argument of type `null' Warning: at toplevel: - (scrutiny-tests.scm:206) in procedure call to `f', expected argument #1 of type `null' but was given an argument of type `(list fixnum)' + (scrutiny-tests.scm:208) in procedure call to `f', expected argument #1 of type `null' but was given an argument of type `(list fixnum)' Warning: at toplevel: - (scrutiny-tests.scm:208) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)' + (scrutiny-tests.scm:210) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)' Warning: in toplevel procedure `vector-ref-warn1': - (scrutiny-tests.scm:214) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 3 + (scrutiny-tests.scm:216) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 3 Warning: in toplevel procedure `vector-ref-warn2': - (scrutiny-tests.scm:216) in procedure call to `scheme#vector-ref', index 3 out of range for vector of length 3 + (scrutiny-tests.scm:218) in procedure call to `scheme#vector-ref', index 3 out of range for vector of length 3 Warning: in toplevel procedure `vector-ref-warn3': - (scrutiny-tests.scm:217) in procedure call to `scheme#vector-ref', index 4 out of range for vector of length 3 + (scrutiny-tests.scm:219) in procedure call to `scheme#vector-ref', index 4 out of range for vector of length 3 Warning: in toplevel procedure `vector-ref-standard-warn1': - (scrutiny-tests.scm:220) in procedure call to `scheme#vector-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:222) in procedure call to `scheme#vector-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `vector-set!-warn1': - (scrutiny-tests.scm:221) in procedure call to `scheme#vector-set!', index -1 out of range for vector of length 3 + (scrutiny-tests.scm:223) in procedure call to `scheme#vector-set!', index -1 out of range for vector of length 3 Warning: in toplevel procedure `vector-set!-warn2': - (scrutiny-tests.scm:222) in procedure call to `scheme#vector-set!', index 3 out of range for vector of length 3 + (scrutiny-tests.scm:224) in procedure call to `scheme#vector-set!', index 3 out of range for vector of length 3 Warning: in toplevel procedure `vector-set!-warn3': - (scrutiny-tests.scm:223) in procedure call to `scheme#vector-set!', index 4 out of range for vector of length 3 + (scrutiny-tests.scm:225) in procedure call to `scheme#vector-set!', index 4 out of range for vector of length 3 Warning: in toplevel procedure `vector-set!-standard-warn1': - (scrutiny-tests.scm:226) in procedure call to `scheme#vector-set!', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:228) in procedure call to `scheme#vector-set!', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-warn1': - (scrutiny-tests.scm:232) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid + (scrutiny-tests.scm:234) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid Warning: in toplevel procedure `list-ref-warn2': - (scrutiny-tests.scm:235) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid + (scrutiny-tests.scm:237) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid Warning: in toplevel procedure `list-ref-warn3': - (scrutiny-tests.scm:238) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid + (scrutiny-tests.scm:240) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid Warning: in toplevel procedure `list-ref-warn4': - (scrutiny-tests.scm:240) in procedure call to `scheme#list-ref', index 3 out of range for proper list of length 3 + (scrutiny-tests.scm:242) in procedure call to `scheme#list-ref', index 3 out of range for proper list of length 3 Warning: in toplevel procedure `list-ref-warn5': - (scrutiny-tests.scm:246) in procedure call to `scheme#list-ref', index 4 out of range for proper list of length 3 + (scrutiny-tests.scm:248) in procedure call to `scheme#list-ref', index 4 out of range for proper list of length 3 Warning: in toplevel procedure `list-ref-standard-warn1': - (scrutiny-tests.scm:275) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:277) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-standard-warn2': - (scrutiny-tests.scm:276) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:278) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-standard-warn3': - (scrutiny-tests.scm:278) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:280) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-standard-warn4': - (scrutiny-tests.scm:279) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' + (scrutiny-tests.scm:281) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-type-warn1': - (scrutiny-tests.scm:283) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:285) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-type-warn2': - (scrutiny-tests.scm:285) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:287) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `list-ref-type-warn3': - (scrutiny-tests.scm:289) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:291) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `append-result-type-warn1': - (scrutiny-tests.scm:301) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:303) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: in toplevel procedure `append-result-type-warn2': - (scrutiny-tests.scm:306) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' + (scrutiny-tests.scm:308) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol' Warning: redefinition of standard binding: scheme#car diff --git a/tests/syntax-tests.scm b/tests/syntax-tests.scm index 29281faa..a0f2aa02 100644 --- a/tests/syntax-tests.scm +++ b/tests/syntax-tests.scm @@ -3,6 +3,8 @@ (import-for-syntax pretty-print) (import gc pretty-print) +(eval '(import scheme)) ;; TODO: Get rid of this? + (define-syntax t (syntax-rules () ((_ r x) diff --git a/tests/user-pass-tests.scm b/tests/user-pass-tests.scm index 0ef5f931..b877a93b 100644 --- a/tests/user-pass-tests.scm +++ b/tests/user-pass-tests.scm @@ -1,6 +1,7 @@ ;;; Test user compilation passes -(import (chicken compiler user-pass) +(import scheme + (chicken compiler user-pass) (chicken io) (chicken pretty-print)) -- 2.11.0