|
7 | 7 | syntax/intdef |
8 | 8 | syntax/srcloc |
9 | 9 | syntax/parse/class/local-value |
10 | | - threading) |
| 10 | + threading |
| 11 | + serialize-syntax-introducer) |
11 | 12 | (postfix-in - (combine-in racket/base |
12 | 13 | racket/promise)) |
13 | 14 | racket/stxparam |
|
313 | 314 | ; forms), it searches for a `binding-declaration` and fills in `internal-id` with the |
314 | 315 | ; actual definition. The `type` field is used as the expected type of the definition. |
315 | 316 | ; fixity : [Maybe Fixity] |
316 | | - (struct binding-declaration [internal-id type delta-syntax fixity] |
| 317 | + (struct binding-declaration [internal-id type scoped-binding-introducer fixity] |
317 | 318 | #:property prop:procedure |
318 | 319 | (λ (this stx) |
319 | 320 | (match-define (binding-declaration x- type _ _) this) |
|
324 | 325 | (define-syntax-class id/binding-declaration |
325 | 326 | #:attributes [internal-id type scoped-binding-introducer fixity] |
326 | 327 | [pattern (~var x (local-value binding-declaration?)) |
327 | | - #:do [(match-define (binding-declaration x-* type* delta* fixity*) |
| 328 | + #:do [(match-define (binding-declaration x-* type* sbi* fixity*) |
328 | 329 | (attribute x.local-value))] |
329 | 330 | #:attr internal-id (syntax-local-introduce x-*) |
330 | 331 | #:with type (syntax-local-introduce type*) |
331 | | - #:attr scoped-binding-introducer (make-syntax-delta-introducer delta* #'_) |
| 332 | + #:attr scoped-binding-introducer (deserialize-syntax-introducer sbi*) |
332 | 333 | #:attr fixity fixity*])) |
333 | 334 |
|
334 | 335 | (define-syntax-parser define/binding-declaration |
|
385 | 386 | ; will be understood by `def`. |
386 | 387 | [_ |
387 | 388 | (syntax-parse stx |
388 | | - [(_ x:id t_unexpanded:expr |
| 389 | + [(_ x:id {~type t:type} |
389 | 390 | {~alt {~optional {~and #:exact exact?}} |
390 | 391 | {~optional f:fixity-annotation}} |
391 | 392 | ...) |
392 | 393 | #:with x- (generate-temporary #'x) |
393 | 394 | #:with exct? (and (attribute exact?) #true) |
394 | 395 | #:with fixity (attribute f.fixity) |
395 | | - #:with {~type t:type} #'t_unexpanded |
396 | 396 | #:with t_reduced (if (attribute exact?) |
397 | 397 | #'t.expansion |
398 | 398 | (type-reduce-context #'t.expansion)) |
399 | | - #:with delta (syntax-local-introduce |
400 | | - ((attribute t.scoped-binding-introducer) #'_)) |
| 399 | + #:with sbi (serialize-syntax-introducer |
| 400 | + (attribute t.scoped-binding-introducer)) |
401 | 401 | #`(begin- |
402 | 402 | (define-values- [] t.residual) |
403 | 403 | (define-syntax- x |
404 | 404 | (binding-declaration |
405 | 405 | (quote-syntax x-) |
406 | 406 | (quote-syntax t_reduced) |
407 | | - (quote-syntax delta) |
| 407 | + (quote-syntax sbi) |
408 | 408 | 'fixity)))])]))) |
409 | 409 |
|
410 | 410 | (define-syntax-parser λ1 |
|
0 commit comments