More info in internal errors.

Fix substitution in nested ... case.
This commit is contained in:
Sam Tobin-Hochstadt 2008-07-07 14:25:15 -04:00
parent 3cd8878999
commit 61cefef89c
2 changed files with 6 additions and 3 deletions

View File

@ -107,7 +107,9 @@
;; raise an internal error - typechecker bug! ;; raise an internal error - typechecker bug!
(define (int-err msg . args) (define (int-err msg . args)
(raise (make-exn:fail:tc (string-append "Internal Typechecker Error: " (apply format msg args)) (raise (make-exn:fail:tc (string-append "Internal Typechecker Error: "
(apply format msg args)
(format "\nwhile typechecking\n~a" (syntax->datum (current-orig-stx))))
(current-continuation-marks)))) (current-continuation-marks))))
(define-syntax (nyi stx) (define-syntax (nyi stx)

View File

@ -40,7 +40,8 @@
[#:arr dom rng rest drest thn-eff els-eff [#:arr dom rng rest drest thn-eff els-eff
(begin (begin
(when (and (pair? drest) (when (and (pair? drest)
(eq? name (cdr drest))) (eq? name (cdr drest))
(just-Dotted? name))
(int-err "substitute used on ... variable ~a in type ~a" name target)) (int-err "substitute used on ... variable ~a in type ~a" name target))
(make-arr (map sb dom) (make-arr (map sb dom)
(sb rng) (sb rng)