diff --git a/piclib/scheme/base.scm b/piclib/scheme/base.scm index 7f5368d5..b9d7ffb5 100644 --- a/piclib/scheme/base.scm +++ b/piclib/scheme/base.scm @@ -383,6 +383,7 @@ (define _pair? (r 'pair?)) (define _null? (r 'null?)) (define _symbol? (r 'symbol?)) + (define _vector? (r 'vector?)) (define _eqv? (r 'eqv?)) (define _string=? (r 'string=?)) (define _map (r 'map)) @@ -519,8 +520,10 @@ (lambda (pattern) (let-values (((match vars) (compile-match-base (vector->list pattern)))) (values - `(,_let ((expr (,_vector->list expr))) - ,match) + `(,_if (,_vector? expr) + (,_let ((expr (,_vector->list expr))) + ,match) + (exit #f)) vars))))) (let-values (((match vars) (compile-match-base (cdr pattern))))