Improve error message for summary.

Fix returned error type for polymorphic apps.
Fix typo.

svn: r11487
This commit is contained in:
Sam Tobin-Hochstadt 2008-08-29 20:14:22 +00:00
parent 3ac6b485a5
commit fa8ffb417e
2 changed files with 4 additions and 4 deletions

View File

@ -385,13 +385,13 @@
"function over ~a")])
(if (and (andmap null? msg-doms)
(null? argtypes))
(tc-error/expr #:return (ret (-> (Un)))
(tc-error/expr #:return (ret (Un))
(string-append
"Could not infer types for applying polymorphic "
fcn-string
"\n")
(stringify msg-vars))
(tc-error/expr #:return (ret (->* (list) Univ (Un)))
(tc-error/expr #:return (ret (Un))
(string-append
"Polymorphic " fcn-string " could not be applied to arguments:~n"
(domain-mismatches t msg-doms msg-rests msg-drests argtypes #f #f))
@ -443,7 +443,7 @@
(cond [(null? doms*)
(tc-error/expr
#:return (ret (Un))
(string-append "No function domains matched in function application:"
(string-append "No function domains matched in function application:\n"
(domain-mismatches t doms rests drests argtypes #f #f)))]
[(subtypes/varargs argtypes (car doms*) (car rests*))
(when (car rests*)

View File

@ -68,7 +68,7 @@
(err-stx e))])
(reset!)
(unless (null? stxs)
(raise-typecheck-error "Errors encountered" (apply append stxs))))]))
(raise-typecheck-error (format "Summary: ~a errors encountered" (length stxs)) (apply append stxs))))]))
(define delay-errors? (make-parameter #t))