Better internal error reporting.

original commit: 58fe07ad70b74345e65ccf58171dc73e96be6b2b
This commit is contained in:
Vincent St-Amour 2010-07-09 14:40:21 -04:00
parent a4cb468a71
commit 52559ccd98

View File

@ -12,7 +12,13 @@
(when (optimize?)
(hash-set! table e t)))
(define (type-of e) (hash-ref table e (lambda () (int-err (format "no type for ~a" (syntax->datum e))))))
(define (type-of e)
(hash-ref table e
(lambda () (int-err (format "no type for ~a at: ~a line ~a col ~a"
(syntax->datum e)
(syntax-source e)
(syntax-line e)
(syntax-column e))))))
(define struct-fn-table (make-free-id-table))