Change else in match to _

This fixes at least one "potential" bug in the file
`collects/pkg/private/create.rkt`, where `else` in the
`cond` is bound to `else` from `match` instead of `racket/base`.
(though it turns out that the format will always be
truthy, making the program happen to be correct.)
This commit is contained in:
Sorawee Porncharoenwase 2020-08-22 06:00:05 -07:00 committed by Matthew Flatt
parent 6edc3dbfab
commit 66547f3aaf
26 changed files with 72 additions and 72 deletions

View File

@ -124,7 +124,7 @@
['start (when (verbose) (printf " ~a making ~a\n" id (->rel work)))] ['start (when (verbose) (printf " ~a making ~a\n" id (->rel work)))]
['done (when (verbose) (printf " ~a made ~a\n" id (->rel work)))] ['done (when (verbose) (printf " ~a made ~a\n" id (->rel work)))]
['output (printf " ~a output from: ~a\n~a~a" id work out err)] ['output (printf " ~a output from: ~a\n~a~a" id work out err)]
[else (printf " ~a error compiling ~a\n~a\n~a~a" id work msg out err)])) [_ (printf " ~a error compiling ~a\n~a\n~a~a" id work msg out err)]))
#:options (let ([cons-if-true (lambda (bool carv cdrv) #:options (let ([cons-if-true (lambda (bool carv cdrv)
(if bool (if bool
(cons carv cdrv) (cons carv cdrv)

View File

@ -63,7 +63,7 @@
[plt-home-rel? (printf " unpack to main installation\n")] [plt-home-rel? (printf " unpack to main installation\n")]
[plt-rel? (printf " unpack to user add-ons\n")] [plt-rel? (printf " unpack to user add-ons\n")]
[else (printf " unpack locally\n")])] [else (printf " unpack locally\n")])]
[else [_
(printf "config function:\n") (printf "config function:\n")
(pretty-write config)])) (pretty-write config)]))
a) a)
@ -74,7 +74,7 @@
(printf "setup collections:\n") (printf "setup collections:\n")
(for ([c (in-list c)]) (for ([c (in-list c)])
(printf " ~s\n" (string-join c "/")))] (printf " ~s\n" (string-join c "/")))]
[else [_
(printf "setup unit:\n") (printf "setup unit:\n")
(pretty-write setup)])) (pretty-write setup)]))
a) a)

View File

@ -282,9 +282,9 @@
num-shares share-vec num-shares share-vec
mutable-fill-vec mutable-fill-vec
result-vec)] result-vec)]
[else [_
(decompile-linklet l)])] (decompile-linklet l)])]
[else [_
(decompile-linklet l)])] (decompile-linklet l)])]
[(struct faslable-correlated-linklet (expr name)) [(struct faslable-correlated-linklet (expr name))
(match (strip-correlated expr) (match (strip-correlated expr)
@ -307,9 +307,9 @@
num-shares share-vec num-shares share-vec
mutable-fill-vec mutable-fill-vec
result-vec)] result-vec)]
[else [_
(decompile-linklet l)])] (decompile-linklet l)])]
[else [_
(decompile-linklet l)])) (decompile-linklet l)]))
(define (decompile-form form globs stack closed) (define (decompile-form form globs stack closed)
@ -330,7 +330,7 @@
`(begin ,@(map (lambda (form) `(begin ,@(map (lambda (form)
(decompile-form form globs stack closed)) (decompile-form form globs stack closed))
forms))] forms))]
[else [_
(decompile-expr form globs stack closed)])) (decompile-expr form globs stack closed)]))
(define (extract-name name) (define (extract-name name)
@ -348,7 +348,7 @@
(extract-name name)] (extract-name name)]
[(struct closure (lam gen-id)) [(struct closure (lam gen-id))
(extract-id lam)] (extract-id lam)]
[else #f])) [_ #f]))
(define (extract-ids! body ids) (define (extract-ids! body ids)
(match body (match body
@ -362,7 +362,7 @@
(extract-ids! body ids)] (extract-ids! body ids)]
[(struct boxenv (pos body)) [(struct boxenv (pos body))
(extract-ids! body ids)] (extract-ids! body ids)]
[else #f])) [_ #f]))
(define (decompile-tl expr globs stack closed no-check?) (define (decompile-tl expr globs stack closed no-check?)
(match expr (match expr
@ -441,10 +441,10 @@
`(begin `(begin
(set! ,id (#%box ,id)) (set! ,id (#%box ,id))
,(decompile-expr body globs stack closed)))] ,(decompile-expr body globs stack closed)))]
[(struct branch (test then else)) [(struct branch (test then els))
`(if ,(decompile-expr test globs stack closed) `(if ,(decompile-expr test globs stack closed)
,(decompile-expr then globs stack closed) ,(decompile-expr then globs stack closed)
,(decompile-expr else globs stack closed))] ,(decompile-expr els globs stack closed))]
[(struct application (rator rands)) [(struct application (rator rands))
(let ([stack (append (for/list ([i (in-list rands)]) (gensym 'rand)) (let ([stack (append (for/list ([i (in-list rands)]) (gensym 'rand))
stack)]) stack)])
@ -485,7 +485,7 @@
(hash-set! closed gen-id #t) (hash-set! closed gen-id #t)
`(#%closed ,gen-id ,(decompile-expr lam globs stack closed))))] `(#%closed ,gen-id ,(decompile-expr lam globs stack closed))))]
[(? void?) (list 'void)] [(? void?) (list 'void)]
[else `(quote ,expr)])) [_ `(quote ,expr)]))
(define (decompile-lam expr globs stack closed) (define (decompile-lam expr globs stack closed)
(match expr (match expr

View File

@ -160,7 +160,7 @@
[(def-values ids rhs) [(def-values ids rhs)
(for/or ([id (in-list ids)]) (for/or ([id (in-list ids)])
(eq? 'used (hash-ref used (toplevel-pos id) #f)))] (eq? 'used (hash-ref used (toplevel-pos id) #f)))]
[else (not (pure? b))])) [_ (not (pure? b))]))
b)) b))
(define new-body (remap-positions used-body (define new-body (remap-positions used-body

View File

@ -97,7 +97,7 @@
(match n (match n
[(? (lambda (x) (x . < . 0))) (raise (format "split-n: n: ~a less than 0" n))] [(? (lambda (x) (x . < . 0))) (raise (format "split-n: n: ~a less than 0" n))]
[1 lst] [1 lst]
[else [_
(define splits (sub1 n)) (define splits (sub1 n))
(define-values (q r) (quotient/remainder (length lst) n)) (define-values (q r) (quotient/remainder (length lst) n))
(let loop ([lst-in lst] (let loop ([lst-in lst]

View File

@ -153,16 +153,16 @@
;; if this happens, this code should be updated ;; if this happens, this code should be updated
(error 'make-script (error 'make-script
"internal error: unexpected tooltip"))] "internal error: unexpected tooltip"))]
[else body])]) [_ body])])
(values (compact-url href) (compact-body body)))] (values (compact-url href) (compact-body body)))]
[else [_
(log-error "search script: unrecognized index-entry shape: ~e" e) (log-error "search script: unrecognized index-entry shape: ~e" e)
(values #f #f)]))) (values #f #f)])))
(define (lib->name lib) (define (lib->name lib)
(quote-string (let loop ([lib lib]) (quote-string (let loop ([lib lib])
(match lib (match lib
[`',lib (string-append "'" (loop lib))] [`',lib (string-append "'" (loop lib))]
[else (format "~s" lib)])))) [_ (format "~s" lib)]))))
(define from-libs (define from-libs
(cond (cond
[(exported-index-desc? desc) [(exported-index-desc? desc)

View File

@ -576,10 +576,10 @@
[_ 'no])) [_ 'no]))
(comp 1 (comp 1
(match (box 'x) ('#&x 1) (else #f))) (match (box 'x) ('#&x 1) (_ #f)))
(comp 2 (comp 2
(match (vector 1 2) ('#(1 2) 2) (else #f))) (match (vector 1 2) ('#(1 2) 2) (_ #f)))
(comp 'yes (comp 'yes
(with-handlers ([exn:fail? (lambda _ 'yes)] (with-handlers ([exn:fail? (lambda _ 'yes)]
@ -622,7 +622,7 @@
(comp 'bad (comp 'bad
(match #(1) (match #(1)
[(vector a b) a] [(vector a b) a]
[else 'bad])) [_ 'bad]))
(comp '(1 2) (comp '(1 2)
(call-with-values (call-with-values
@ -680,7 +680,7 @@
(match (make-pose 1 2 3) (match (make-pose 1 2 3)
[(struct pose (x y a)) "Gotcha!"] [(struct pose (x y a)) "Gotcha!"]
[else "Epic fail!"]))) [_ "Epic fail!"])))
(comp #f (comp #f
(match (list 'a 'b 'c) (match (list 'a 'b 'c)

View File

@ -16,11 +16,11 @@
(check eq? #t (match '(tile a b c) (check eq? #t (match '(tile a b c)
[`(tile ,@'(a b c)) [`(tile ,@'(a b c))
#t] #t]
[else #f])) [_ #f]))
(check eq? #t (match '(tile a b c) (check eq? #t (match '(tile a b c)
[`(tile ,@`(a b c)) [`(tile ,@`(a b c))
#t] #t]
[else #f]))))) [_ #f])))))
(define cons-tests (define cons-tests
(test-suite "Tests for cons pattern" (test-suite "Tests for cons pattern"
(test-case "simple" (test-case "simple"
@ -197,7 +197,7 @@
(define (origin? pt) (define (origin? pt)
(match pt (match pt
((struct point (0 0)) #t) ((struct point (0 0)) #t)
(else #f))) (_ #f)))
(check-true (origin? (make-point 0 0))) (check-true (origin? (make-point 0 0)))
(check-false (origin? (make-point 1 1))))) (check-false (origin? (make-point 1 1)))))
; These tests ensures that the unsafe struct optimization is correct ; These tests ensures that the unsafe struct optimization is correct
@ -209,7 +209,7 @@
(define (origin? pt) (define (origin? pt)
(match pt (match pt
((struct point (0 0)) #t) ((struct point (0 0)) #t)
(else #f))) (_ #f)))
(check-true (origin? (make-point 'a 0 0))) (check-true (origin? (make-point 'a 0 0)))
(check-false (origin? (make-point 'a 1 1)))))) (check-false (origin? (make-point 'a 1 1))))))
(test-case "struct patterns (with fake struct info)" (test-case "struct patterns (with fake struct info)"
@ -221,7 +221,7 @@
(define (origin? pt) (define (origin? pt)
(match pt (match pt
((struct point (0 1)) #t) ((struct point (0 1)) #t)
(else #f))) (_ #f)))
(check-true (origin? (list 0 1))) (check-true (origin? (list 0 1)))
(check-false (origin? (list 1 1))) (check-false (origin? (list 1 1)))
(check-false (origin? (list 1 1 1))) (check-false (origin? (list 1 1 1)))

View File

@ -37,7 +37,7 @@
(define (origin? pt) (define (origin? pt)
(match pt (match pt
(($ point 0 0) #t) (($ point 0 0) #t)
(else #f))) (_ #f)))
(check-true (origin? (make-point 0 0))) (check-true (origin? (make-point 0 0)))
(check-false (origin? (make-point 1 1))))) (check-false (origin? (make-point 1 1)))))
(test-case "empty hash-table pattern bug" (test-case "empty hash-table pattern bug"

View File

@ -39,56 +39,56 @@
(mytest (match "hello" (mytest (match "hello"
((pregexp (pregexp "hello")) #t) ((pregexp (pregexp "hello")) #t)
(else #f)) (_ #f))
#t) #t)
(mytest (match 123 (mytest (match 123
((pregexp "123") #t) ((pregexp "123") #t)
(else #f)) (_ #f))
#f) #f)
(mytest (match 123 (mytest (match 123
((regexp "123") #t) ((regexp "123") #t)
(else #f)) (_ #f))
#f) #f)
(mytest (match 123 (mytest (match 123
((pregexp "123" (list a ...)) #t) ((pregexp "123" (list a ...)) #t)
(else #f)) (_ #f))
#f) #f)
(mytest (match 123 (mytest (match 123
((regexp "123" (list a ...)) #t) ((regexp "123" (list a ...)) #t)
(else #f)) (_ #f))
#f) #f)
(mytest (match "hello" (mytest (match "hello"
((regexp "hello") #t) ((regexp "hello") #t)
(else #f)) (_ #f))
#t) #t)
(mytest (match "frank" (mytest (match "frank"
((regexp "hello") #t) ((regexp "hello") #t)
((regexp "frank") 2) ((regexp "frank") 2)
(else #f)) (_ #f))
2) 2)
(mytest (match "frank" (mytest (match "frank"
((pregexp "hello") #t) ((pregexp "hello") #t)
((pregexp "frank") 2) ((pregexp "frank") 2)
(else #f)) (_ #f))
2) 2)
(mytest (match "frank" (mytest (match "frank"
((regexp "hello") #t) ((regexp "hello") #t)
(else #f)) (_ #f))
#f) #f)
(mytest (match "hello" (mytest (match "hello"
((regexp "(hel)lo" (list whol a rest ...)) a) ((regexp "(hel)lo" (list whol a rest ...)) a)
(else #f)) (_ #f))
"hel") "hel")
(mytest (match "hello" (mytest (match "hello"
((pregexp "(hel)lo" (list whole a rest ...)) a) ((pregexp "(hel)lo" (list whole a rest ...)) a)
(else #f)) (_ #f))
"hel") "hel")
(mytest (match-let* (mytest (match-let*
@ -117,28 +117,28 @@
[(list 'case-> types ...) 1] [(list 'case-> types ...) 1]
[(list '->) 2] [(list '->) 2]
[(list '-> types ...) 3] [(list '-> types ...) 3]
[else 4]) [_ 4])
1) 1)
(mytest (match '(->) (mytest (match '(->)
[(list 'case-> types ...) 1] [(list 'case-> types ...) 1]
[(list '->) 2] [(list '->) 2]
[(list '-> types ...) 3] [(list '-> types ...) 3]
[else 4]) [_ 4])
2) 2)
(mytest (match '(-> a b) (mytest (match '(-> a b)
[(list 'case-> types ...) 1] [(list 'case-> types ...) 1]
[(list '->) 2] [(list '->) 2]
[(list '-> types ...) 3] [(list '-> types ...) 3]
[else 4]) [_ 4])
3) 3)
(mytest (match 'x (mytest (match 'x
[(list 'case-> types ...) 1] [(list 'case-> types ...) 1]
[(list '->) 2] [(list '->) 2]
[(list '-> types ...) 3] [(list '-> types ...) 3]
[else 4]) [_ 4])
4) 4)
(mytest (match '((r a)) (mytest (match '((r a))

View File

@ -21,7 +21,7 @@
['start (printf " Making ~a\n" work)] ['start (printf " Making ~a\n" work)]
['done (printf " Made ~a\n" work)] ['done (printf " Made ~a\n" work)]
['output (printf " Output from: ~a\n~a~a" work out err)] ['output (printf " Output from: ~a\n~a~a" work out err)]
[else (eprintf " Error compiling ~a\n~a\n~a~a" work msg out err)]))) [_ (eprintf " Error compiling ~a\n~a\n~a~a" work msg out err)])))
(define compiled (car (use-compiled-file-paths))) (define compiled (car (use-compiled-file-paths)))

View File

@ -36,7 +36,7 @@
[(linkl-bundle table) [(linkl-bundle table)
;; single linklet bundle: ;; single linklet bundle:
(zo-marshal-bundle-to table outp)] (zo-marshal-bundle-to table outp)]
[else [_
(error 'zo-marshal-top "not a linklet bundle or directory:" top)])) (error 'zo-marshal-top "not a linklet bundle or directory:" top)]))
(define (zo-marshal-directory-to top outp) (define (zo-marshal-directory-to top outp)
@ -616,11 +616,11 @@
(out-number boxenv-type-num out) (out-number boxenv-type-num out)
(out-anything pos out) (out-anything pos out)
(out-anything (protect-quote body) out)] (out-anything (protect-quote body) out)]
[(struct branch (test then else)) [(struct branch (test then els))
(out-byte CPT_BRANCH out) (out-byte CPT_BRANCH out)
(out-anything (protect-quote test) out) (out-anything (protect-quote test) out)
(out-anything (protect-quote then) out) (out-anything (protect-quote then) out)
(out-anything (protect-quote else) out)] (out-anything (protect-quote els) out)]
[(struct application (rator rands)) [(struct application (rator rands))
(let ([len (length rands)]) (let ([len (length rands)])
(if (len . < . (- CPT_SMALL_APPLICATION_END CPT_SMALL_APPLICATION_START)) (if (len . < . (- CPT_SMALL_APPLICATION_END CPT_SMALL_APPLICATION_START))
@ -826,7 +826,7 @@
(define bstr (get-output-bytes s)) (define bstr (get-output-bytes s))
(out-number (bytes-length bstr) out) (out-number (bytes-length bstr) out)
(out-bytes bstr out)] (out-bytes bstr out)]
[else (error 'out-anything "~s" (current-type-trace))]))))) [_ (error 'out-anything "~s" (current-type-trace))])))))
(define (out-linklet linklet-form out) (define (out-linklet linklet-form out)
(out-byte CPT_LINKLET out) (out-byte CPT_LINKLET out)

View File

@ -432,7 +432,7 @@
(pkg-desc url-str (if reject-existing? 'clone current-type) name (pkg-desc url-str (if reject-existing? 'clone current-type) name
checksum auto? extra-path)] checksum auto? extra-path)]
[else #f])] [else #f])]
[else #f])) [_ #f]))
;; For a `desc`, extract it's clone location, if it's a clone ;; For a `desc`, extract it's clone location, if it's a clone
(define (desc-clone desc) (define (desc-clone desc)

View File

@ -133,7 +133,7 @@
(define (default-pkg-scope) (define (default-pkg-scope)
(match (default-pkg-scope-as-string) (match (default-pkg-scope-as-string)
["installation" 'installation] ["installation" 'installation]
[else 'user])) [_ 'user]))
(define (default-pkg-scope-as-string) (define (default-pkg-scope-as-string)
(read-pkg-cfg/def 'default-scope)) (read-pkg-cfg/def 'default-scope))

View File

@ -35,7 +35,7 @@
(find-files file-exists?)))]) (find-files file-exists?)))])
(display f) (display f)
(newline))))] (newline))))]
[else [_
(define pkg (format "~a.~a" pkg-name create:format)) (define pkg (format "~a.~a" pkg-name create:format))
(define actual-dest-dir (if dest-dir (define actual-dest-dir (if dest-dir
(path->complete-path dest-dir) (path->complete-path dest-dir)

View File

@ -26,7 +26,7 @@
(system "whoami")] (system "whoami")]
['windows ['windows
(system "echo %username%")] (system "echo %username%")]
[else (pkg-error "not supported")]))))) [_ (pkg-error "not supported")])))))
(define ==== (define ====
(make-string (string-length name) #\=)) (make-string (string-length name) #\=))

View File

@ -151,7 +151,7 @@
;; Can use compiled bytecode, etc.: ;; Can use compiled bytecode, etc.:
(parameterize ([current-namespace ns]) (parameterize ([current-namespace ns])
(dynamic-require file '#%info-lookup)))))])] (dynamic-require file '#%info-lookup)))))])]
[else (err "does not contain a module of the right shape")]))) [_ (err "does not contain a module of the right shape")])))
(define (filter-environment-variables ev) (define (filter-environment-variables ev)
(let ([keep (environment-variables-ref ev #"PLT_INFO_ALLOW_VARS")] (let ([keep (environment-variables-ref ev #"PLT_INFO_ALLOW_VARS")]

View File

@ -58,7 +58,7 @@
(idle! +1) (idle! +1)
(hash-set! depends wrkr (cons w fn)) (hash-set! depends wrkr (cons w fn))
(list w (append waitlst (list wrkr)))]))] (list w (append waitlst (list wrkr)))]))]
[else [_
(wrkr/send wrkr (list 'locked)) (wrkr/send wrkr (list 'locked))
(list wrkr null)])) (list wrkr null)]))
(not v))) (not v)))
@ -122,18 +122,18 @@
(append-error cc "making" #f out err "output")) (append-error cc "making" #f out err "output"))
;(when last (printer (current-output-port) "made" "~a" (cc-name cc))) ;(when last (printer (current-output-port) "made" "~a" (cc-name cc)))
#t] #t]
[else (eprintf "Failed trying to match:\n~s\n" result-type)]))] [_ (eprintf "Failed trying to match:\n~s\n" result-type)]))]
[(list _ (list 'ADD fn)) [(list _ (list 'ADD fn))
;; Currently ignoring queued individual files ;; Currently ignoring queued individual files
#f] #f]
[else [_
(match work (match work
[(list-rest (list cc file last) message) [(list-rest (list cc file last) message)
(append-error cc "making" #f "" "" "error") (append-error cc "making" #f "" "" "error")
(eprintf "work-done match cc failed.\n") (eprintf "work-done match cc failed.\n")
(eprintf "trying to match:\n~e\n" (list work msg)) (eprintf "trying to match:\n~e\n" (list work msg))
#t] #t]
[else [_
(eprintf "work-done match cc failed.\n") (eprintf "work-done match cc failed.\n")
(eprintf "trying to match:\n~e\n" (list work msg)) (eprintf "trying to match:\n~e\n" (list work msg))
(eprintf "FATAL\n") (eprintf "FATAL\n")
@ -176,7 +176,7 @@
[(cons (list cc (cons file ft) subs) tail) [(cons (list cc (cons file ft) subs) tail)
(hash-set! hash id (cons (list cc ft subs) tail)) (hash-set! hash id (cons (list cc ft subs) tail))
(build-job cc file #f)] (build-job cc file #f)]
[else [_
(eprintf "get-job match cc failed.\n") (eprintf "get-job match cc failed.\n")
(eprintf "trying to match:\n~v\n" cc)])) (eprintf "trying to match:\n~v\n" cc)]))
@ -258,7 +258,7 @@
(set! filelist (cons fn filelist)) (set! filelist (cons fn filelist))
(set! seen (hash-set seen fn #t))) (set! seen (hash-set seen fn #t)))
#f] #f]
[else [_
(handler id 'fatalerror (format "Error matching work: ~a queue ~a" work filelist) "" "") #t])) (handler id 'fatalerror (format "Error matching work: ~a queue ~a" work filelist) "" "") #t]))
(define/public (get-job workerid) (define/public (get-job workerid)
@ -316,12 +316,12 @@
[(list 'compiled) #f] [(list 'compiled) #f]
[(list 'DIE) (worker/die 1)] [(list 'DIE) (worker/die 1)]
[x (send/error (format "DIDNT MATCH B ~v\n" x))] [x (send/error (format "DIDNT MATCH B ~v\n" x))]
[else (send/error (format "DIDNT MATCH B\n"))])] [_ (send/error (format "DIDNT MATCH B\n"))])]
['unlock ['unlock
(DEBUG_COMM (eprintf "UNLOCKING ~a ~a ~a\n" worker-id name _full-file)) (DEBUG_COMM (eprintf "UNLOCKING ~a ~a ~a\n" worker-id name _full-file))
(send/msg (list (list 'UNLOCK (path->bytes fn)) "" ""))] (send/msg (list (list 'UNLOCK (path->bytes fn)) "" ""))]
[x (send/error (format "DIDNT MATCH C ~v\n" x))] [x (send/error (format "DIDNT MATCH C ~v\n" x))]
[else (send/error (format "DIDNT MATCH C\n"))])) [_ (send/error (format "DIDNT MATCH C\n"))]))
(with-handlers ([exn:fail? (lambda (x) (with-handlers ([exn:fail? (lambda (x)
(send/resp (list 'ERROR (send/resp (list 'ERROR
;; Long form shows context: ;; Long form shows context:
@ -364,7 +364,7 @@
(stop-logging-thread)) (stop-logging-thread))
(send/resp 'DONE))] (send/resp 'DONE))]
[x (send/error (format "DIDNT MATCH A ~v\n" x))] [x (send/error (format "DIDNT MATCH A ~v\n" x))]
[else (send/error (format "DIDNT MATCH A\n"))])))) [_ (send/error (format "DIDNT MATCH A\n"))]))))
(define (parallel-compile-files list-of-files (define (parallel-compile-files list-of-files
#:worker-count [worker-count (processor-count)] #:worker-count [worker-count (processor-count)]

View File

@ -293,7 +293,7 @@
(begin (begin
(queue/work-done work-queue node wrkr (string-append msg (wrkr/read-all wrkr))) (queue/work-done work-queue node wrkr (string-append msg (wrkr/read-all wrkr)))
(kill/remove-dead-worker node-worker wrkr))))))] (kill/remove-dead-worker node-worker wrkr))))))]
[else [_
(log-error (format "parallel-do-event-loop match node-worker failed trying to match: ~e" (log-error (format "parallel-do-event-loop match node-worker failed trying to match: ~e"
node-worker))])) node-worker))]))
(DEBUG_COMM (printf "WAITING ON WORKERS TO RESPOND\n")) (DEBUG_COMM (printf "WAITING ON WORKERS TO RESPOND\n"))

View File

@ -1276,7 +1276,7 @@
(and (path? base) (and (path? base)
(equal? (path->directory-path p) (equal? (path->directory-path p)
(path->directory-path base)))))))] (path->directory-path base)))))))]
[else [_
#t]) #t])
p)])) p)]))
(if (and dir (if (and dir

View File

@ -301,7 +301,7 @@
(not (eq? test-dirs 'else)) (not (eq? test-dirs 'else))
(cadr test-dirs))] (cadr test-dirs))]
[else (failure)]))] [else (failure)]))]
[else [_
(error "info-procedure S-expression did not have the expected shape: " (error "info-procedure S-expression did not have the expected shape: "
v)]))]) v)]))])
(unless (and (procedure? info) (unless (and (procedure? info)
@ -458,7 +458,7 @@
((length target-dir-info) . > . 1) ((length target-dir-info) . > . 1)
print-status) print-status)
collections] collections]
[else [_
(error "expected a `unit' pattern, got" u)]))) (error "expected a `unit' pattern, got" u)])))
;; Cancelled: no collections ;; Cancelled: no collections

View File

@ -558,7 +558,7 @@ EOS
out))] out))]
[#"highest_type" (display highest-type out)] [#"highest_type" (display highest-type out)]
[#"lowest_type" (display lowest-type out)] [#"lowest_type" (display lowest-type out)]
[else [_
(let ([m2 (regexp-match (format "~a, */[*] ([0-9]+) [*]/" (cadr m)) (let ([m2 (regexp-match (format "~a, */[*] ([0-9]+) [*]/" (cadr m))
styles)]) styles)])
(if m2 (if m2

View File

@ -362,5 +362,5 @@
(match v (match v
[`(begin ,vs ...) [`(begin ,vs ...)
(for-each loop vs)] (for-each loop vs)]
[else [_
(pretty-write (rename-functions (rename-locals v)))]))))))) (pretty-write (rename-functions (rename-locals v)))])))))))

View File

@ -75,7 +75,7 @@
;; Strip away a `begin` that's there to record a function name: ;; Strip away a `begin` that's there to record a function name:
(match orig-body (match orig-body
[`(begin (quote ,_) ,e) e] [`(begin (quote ,_) ,e) e]
[else orig-body])) [_ orig-body]))
(cond (cond
[(let ([result (extract-result body)]) [(let ([result (extract-result body)])
(and (pair? result) (and (pair? result)

View File

@ -69,7 +69,7 @@
(cons (prune rator #f) (cons (prune rator #f)
(for/list ([rand (in-list rands)]) (for/list ([rand (in-list rands)])
(prune rand #f)))] (prune rand #f)))]
[else e])) [_ e]))
(define (get-single-id ids) (define (get-single-id ids)
(and (pair? ids) (and (pair? ids)

View File

@ -298,13 +298,13 @@
[`(,def ,err-val ,flags ,ret ,name ,args) [`(,def ,err-val ,flags ,ret ,name ,args)
`(,def ,err-val ,flags ,(update-type ret) ,name `(,def ,err-val ,flags ,(update-type ret) ,name
,(map (lambda (a) (update-bind a #:as-argument? #t)) args))] ,(map (lambda (a) (update-bind a #:as-argument? #t)) args))]
[else e])) [_ e]))
(define (update-type-types e) (define (update-type-types e)
(match e (match e
[`(define-struct-type ,name ,fields) [`(define-struct-type ,name ,fields)
`(define-struct-type ,name ,(map update-bind fields))] `(define-struct-type ,name ,(map update-bind fields))]
[else e])) [_ e]))
(define content (define content
(append (append