remove some misleading uses of 'else' from Redex

This commit is contained in:
Robby Findler 2013-05-04 09:28:11 -05:00
parent 0aa8862109
commit b9375bc7e3
2 changed files with 4 additions and 4 deletions

View File

@ -111,7 +111,7 @@
(for/and ([p ps]) (loop p))]
[(? (compose not pair?))
(or (symbol? p) (number? p) (string? p) (boolean? p))]
[else
[_
(and is-pat*?
(match p
[`(cstr (,nts ...) ,p*)
@ -733,7 +733,7 @@
(match sub-pat
[`(repeat ,pat ,name ,mismatch)
(error "can't normalize pattern: ~s" pat)]
[else
[_
(loop sub-pat)])))]
[(? (compose not pair?))
pat])))

View File

@ -660,7 +660,7 @@
(list* (unparse-pattern sub-pat) ellipsis (unparse-pattern rest)))]
[(cons first rest)
(cons (unparse-pattern first) (unparse-pattern rest))]
[else else]))
[other other]))
;; class-reassignments : parsed-pattern -> hash[sym -o> sym]
(define (class-reassignments pattern)
@ -718,7 +718,7 @@
[`(repeat ,p ,name ,mismatch?)
(record-binder name under)
(recur p (cons (or name (gensym)) under))]
[else (recur lpat under)]))
[_ (recur lpat under)]))
assignments]
[(? (compose not pair?)) assignments]))
(make-immutable-hasheq (hash-map assignments (λ (cls _) (cons cls (find cls assignments)))))))