From 52559ccd9833567cc0e9a4ebe78c39d9840e42f8 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Fri, 9 Jul 2010 14:40:21 -0400 Subject: [PATCH] Better internal error reporting. original commit: 58fe07ad70b74345e65ccf58171dc73e96be6b2b --- collects/typed-scheme/types/type-table.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/types/type-table.rkt b/collects/typed-scheme/types/type-table.rkt index 8e742f21..b9784dfa 100644 --- a/collects/typed-scheme/types/type-table.rkt +++ b/collects/typed-scheme/types/type-table.rkt @@ -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))