Canonicalize atoms during pattern- and projection-compilation and value-matching

This commit is contained in:
Tony Garnock-Jones 2015-10-23 19:17:17 -04:00
parent f1bf1f5256
commit f5d331b0d8
1 changed files with 3 additions and 3 deletions

View File

@ -301,7 +301,7 @@
(rseq (struct->struct-type p)
(walk-pair-chain (cdr (vector->list (struct->vector p)))
acc))]
[other (rseq other acc)]))
[other (rseq (canonicalize other) acc)]))
(walk-pair-chain ps0 (rsuccess v)))
@ -527,7 +527,7 @@
[#f (walk rest stack (get ?))]
[k (walk (cdr (vector->list (struct->vector s))) (cons rest stack) k)])]
[(cons v rest)
(walk rest stack (rlookup r v (get ?)))])])))
(walk rest stack (rlookup r (canonicalize v) (get ?)))])])))
;; Matcher Matcher -> Value
;;
@ -638,7 +638,7 @@
(cons (struct->struct-type p)
(walk-pair-chain (cdr (vector->list (struct->vector p)))
acc))]
[other (cons other acc)]))
[other (cons (canonicalize other) acc)]))
(walk-pair-chain ps0 '()))