diff --git a/collects/scheme/match/gen-match.ss b/collects/scheme/match/gen-match.ss index 44a89b941a..eac1de5174 100644 --- a/collects/scheme/match/gen-match.ss +++ b/collects/scheme/match/gen-match.ss @@ -16,6 +16,7 @@ (with-syntax ([(xs ...) (generate-temporaries exprs)] [(exprs ...) exprs] [(fail) (generate-temporaries #'(fail))]) + ;(printf "here in go ~a~n" (list (syntax-line (orig-stx)) (syntax-source (orig-stx)))) (with-syntax ([body (compile* (syntax->list #'(xs ...)) (map (lambda (pats rhs) (unless (= len (length (syntax->list pats))) @@ -43,4 +44,4 @@ (let ([xs exprs] ...) (let ([fail (lambda () #,(syntax/loc stx (match:error orig-expr)))]) - body))))))]))) + body))))))]))) \ No newline at end of file diff --git a/collects/scheme/match/parse-legacy.ss b/collects/scheme/match/parse-legacy.ss index 7b21b816b9..0dda80ffde 100644 --- a/collects/scheme/match/parse-legacy.ss +++ b/collects/scheme/match/parse-legacy.ss @@ -71,7 +71,7 @@ (let* (;; the accessors come in reverse order [acc (reverse acc)] ;; remove the first element, if it's #f - [acc (if (not (car acc)) (cdr acc) acc)]) + [acc (cond [(null? acc) acc] [(not (car acc)) (cdr acc)] [else acc])]) (make-Struct id pred (get-lineage #'s) acc (if (eq? '_ (syntax-e #'pats)) (map make-Dummy acc)