|
22 | 22 | ;; and the user's namespace in the teaching languages |
23 | 23 | "private/set-result.rkt" |
24 | 24 | "private/rewrite-error-message.rkt" |
| 25 | + errortrace/marks-to-context |
25 | 26 |
|
26 | | - "private/continuation-mark-key.rkt" |
27 | 27 | "private/create-htdp-executable.rkt" |
28 | 28 | "private/tp-dialog.rkt" |
29 | 29 |
|
|
49 | 49 |
|
50 | 50 | (define o (current-output-port)) |
51 | 51 | (define (oprintf . args) (apply fprintf o args)) |
52 | | - |
| 52 | + |
| 53 | +(define htdp-continuation-mark-key (gensym 'htdp-continuation-mark-key)) |
| 54 | + |
53 | 55 | (define tool@ |
54 | 56 | (unit |
55 | 57 | (import drscheme:tool^) |
|
196 | 198 | (htdp-lang-settings-true/false/empty-as-ids? settings) |
197 | 199 | (get-abbreviate-cons-as-list) |
198 | 200 | (get-use-function-output-syntax?) |
199 | | - (get-output-function-instead-of-lambda?))))))) |
| 201 | + (get-output-function-instead-of-lambda?))) |
| 202 | + |
| 203 | + (errortrace-continuation-mark-set->context |
| 204 | + (lambda (cms) |
| 205 | + (map |
| 206 | + (lambda (list) (apply make-srcloc list)) |
| 207 | + (continuation-mark-set->list cms htdp-continuation-mark-key)))))))) |
200 | 208 |
|
201 | 209 | (define/private (teaching-languages-error-value->string settings v len) |
202 | 210 | (let ([sp (open-output-string)]) |
|
887 | 895 | (symbol? ppath))])) |
888 | 896 |
|
889 | 897 | [define cms (exn-continuation-marks exn)] |
890 | | - [define lcm (continuation-mark-set->list cms teaching-languages-continuation-mark-key)] |
| 898 | + [define lcm (continuation-mark-set->list cms htdp-continuation-mark-key)] |
891 | 899 |
|
892 | 900 | (cond |
893 | 901 | [(not lcm) '()] ;; MF: I don't understand how this could possibly hold |
|
903 | 911 | ;; with-mark : syntax syntax exact-nonnegative-integer -> syntax |
904 | 912 | ;; a member of stacktrace-imports^ |
905 | 913 | ;; guarantees that the continuation marks associated with |
906 | | - ;; teaching-languages-continuation-mark-key are members of the debug-source type |
| 914 | + ;; htdp-continuation-mark-key are members of the debug-source type |
907 | 915 | (define (with-mark source-stx expr phase) |
908 | 916 | [define source (syntax-source source-stx)] |
909 | 917 | [define line (syntax-line source-stx)] |
|
914 | 922 | (if (and (or (symbol? source) (path? source)) (number? alpha) (number? span)) |
915 | 923 | (with-syntax ([expr expr] |
916 | 924 | [mark (list source line col alpha span)] |
917 | | - [tlcmk teaching-languages-continuation-mark-key] |
| 925 | + [tlcmk htdp-continuation-mark-key] |
918 | 926 | [wcm (syntax-shift-phase-level #'with-continuation-mark delta)] |
919 | 927 | [quot (syntax-shift-phase-level #'quote delta)]) |
920 | 928 | #`(wcm (quot tlcmk) (quot mark) expr)) |
|
0 commit comments