Fix uniform arg checking, and minor cleanup.

original commit: 8a07889d08b111c5dfc2db4480bdcd07e978c924
This commit is contained in:
Eric Dobson 2014-05-18 17:04:15 -07:00
parent da1f9e7ef8
commit 1d6fa7e4b1
2 changed files with 3 additions and 4 deletions

View File

@ -231,9 +231,7 @@
;; One is null-end the other is uniform-end
[((seq ss (null-end))
(seq ts (uniform-end t-rest)))
(and
(<= (length ts) (length ss)))
(cgen/list V X Y ss (extend ss ts t-rest))]
(cgen/list V X Y ss (extend ss ts t-rest))]
[((seq ss (uniform-end s-rest))
(seq ts (null-end)))
#f]
@ -241,7 +239,7 @@
[((seq ss (uniform-end s-rest))
(seq ts (uniform-end t-rest)))
(cgen/list V X Y
(cons s-rest (extend ts ss s-rest))
(cons s-rest ss)
(cons t-rest (extend ss ts t-rest)))]
;; dotted below, nothing above
[((seq ss (dotted-end dty dbound))

View File

@ -155,6 +155,7 @@
[infer-t (make-ListDots -String 'a) (make-ListDots -Symbol 'b) #:indices '(b) #:fail]
[infer-t (make-ListDots -String 'a) (make-ListDots -Symbol 'b) #:indices '(a) #:fail]
[infer-t (-lst* -String) (make-ListDots -Symbol 'b) #:indices '(b) #:fail]
[infer-t (->* (list -Symbol) -Symbol -Void) (->* (list) (-v a) -Void) #:vars '(a) #:fail]
;; Currently Broken
;(infer-t (make-ListDots -Symbol 'b) (-pair -Symbol (-lst -Symbol)) #:indices '(b))