~ chicken-core (chicken-5) 735269e953666c5f9a010a491a0b7ed14df3e3a6
commit 735269e953666c5f9a010a491a0b7ed14df3e3a6 Author: Peter Bex <peter@more-magic.net> AuthorDate: Sat Apr 10 15:20:04 2021 +0200 Commit: megane <meganeka@gmail.com> CommitDate: Sat Apr 10 16:48:21 2021 +0300 Minor cleanup Symbols and keywords are disjoint now, so we can remove the needless checks that say (and (symbol? x) (not (keyword? x))), because if something's a symbol, it cannot be a keyword too. This gets rid of some compilation warnings for expand.scm. Signed-off-by: megane <meganeka@gmail.com> diff --git a/expand.scm b/expand.scm index 8da8b2c0..9a3ee7ac 100644 --- a/expand.scm +++ b/expand.scm @@ -763,10 +763,10 @@ (or (##sys#extended-lambda-list? x) (let loop ((x x)) (cond ((null? x)) - ((symbol? x) (not (keyword? x))) + ((symbol? x)) ((pair? x) (let ((s (car x))) - (and (symbol? s) (not (keyword? s)) + (and (symbol? s) (loop (cdr x)) ) ) ) (else #f) ) ) ) ) @@ -849,7 +849,7 @@ (inherit-pair-line-numbers sym (cons (rename (car sym)) (rename (cdr sym))))) ((vector? sym) (list->vector (rename (vector->list sym)))) - ((or (not (symbol? sym)) (keyword? sym)) sym) + ((not (symbol? sym)) sym) ((assq sym renv) => (lambda (a) (dd `(RENAME/RENV: ,sym --> ,(cdr a))) @@ -872,8 +872,8 @@ (do ((i 0 (fx+ i 1)) (f #t (compare (vector-ref s1 i) (vector-ref s2 i)))) ((or (fx>= i len) (not f)) f)))))) - ((and (symbol? s1) (not (keyword? s1)) - (symbol? s2) (not (keyword? s2))) + ((and (symbol? s1) + (symbol? s2)) (let ((ss1 (or (getp s1 '##core#macro-alias) (lookup2 1 s1 dse) s1) ) @@ -912,7 +912,7 @@ sym (cons (mirror-rename (car sym)) (mirror-rename (cdr sym))))) ((vector? sym) (list->vector (mirror-rename (vector->list sym)))) - ((or (not (symbol? sym)) (keyword? sym)) sym) + ((not (symbol? sym)) sym) (else ; Code stolen from strip-syntax (let ((renamed (lookup sym se) ) ) (cond ((assq-reverse sym renv) =>Trap