diff --git a/collects/scheme/contract/private/blame.ss b/collects/scheme/contract/private/blame.ss index 4b9c5f8640..b7c39d0bd0 100644 --- a/collects/scheme/contract/private/blame.ss +++ b/collects/scheme/contract/private/blame.ss @@ -46,15 +46,18 @@ b))) (define (simplify-source loc) - (let* ([src (srcloc-source loc)]) + (let* ([loc (build-source-location loc)] + [src (srcloc-source loc)]) (if (path? src) (let* ([rel (path->main-collects-relative src)]) (if (pair? rel) - (apply build-path - (bytes->path #"") - (map bytes->path-element (cdr rel))) - rel)) - src))) + (struct-copy srcloc loc + [source + (apply build-path + (bytes->path #"") + (map bytes->path-element (cdr rel)))]) + loc)) + loc))) (define (default-blame-format b x custom-message) (let* ([source-message (source-location->prefix