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)
(raise (make-exn:misc:match (format "~a: no matching clause for ~e" form-name val)
(current-continuation-marks)
val
srclocs)))
(raise (make-exn:misc:match
(format "~a: no matching clause for ~e\n location: ~a"
form-name val
(srcloc->string (car srclocs)))
(current-continuation-marks)
val
srclocs)))
(define-syntax-parameter fail
(lambda (stx)