add location info to the match error msg (#1430)

This commit is contained in:
Andrew Kent 2016-08-24 13:51:23 -04:00 committed by Sam Tobin-Hochstadt
parent 2e5b4a6515
commit 753d97335c

View File

@ -22,10 +22,13 @@
(define (match:error val srclocs form-name) (define (match:error val srclocs form-name)
(raise (make-exn:misc:match (format "~a: no matching clause for ~e" form-name val) (raise (make-exn:misc:match
(current-continuation-marks) (format "~a: no matching clause for ~e\n location: ~a"
val form-name val
srclocs))) (srcloc->string (car srclocs)))
(current-continuation-marks)
val
srclocs)))
(define-syntax-parameter fail (define-syntax-parameter fail
(lambda (stx) (lambda (stx)