|
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 |
|
331 | 332 | ; forms), it searches for a `binding-declaration` and fills in `internal-id` with the |
332 | 333 | ; actual definition. The `type` field is used as the expected type of the definition. |
333 | 334 | ; fixity : [Maybe Fixity] |
334 | | - (struct binding-declaration [internal-id type delta-syntax fixity] |
| 335 | + (struct binding-declaration [internal-id type scoped-binding-introducer fixity] |
335 | 336 | #:property prop:procedure |
336 | 337 | (λ (this stx) |
337 | 338 | (match-define (binding-declaration x- type _ _) this) |
|
342 | 343 | (define-syntax-class id/binding-declaration |
343 | 344 | #:attributes [internal-id type scoped-binding-introducer fixity] |
344 | 345 | [pattern (~var x (local-value binding-declaration?)) |
345 | | - #:do [(match-define (binding-declaration x-* type* delta* fixity*) |
| 346 | + #:do [(match-define (binding-declaration x-* type* sbi* fixity*) |
346 | 347 | (attribute x.local-value))] |
347 | 348 | #:attr internal-id (syntax-local-introduce x-*) |
348 | 349 | #:with type (syntax-local-introduce type*) |
349 | | - #:attr scoped-binding-introducer (make-syntax-delta-introducer delta* #'_) |
| 350 | + #:attr scoped-binding-introducer (deserialize-syntax-introducer sbi*) |
350 | 351 | #:attr fixity fixity*])) |
351 | 352 |
|
352 | 353 | (define-syntax-parser define/binding-declaration |
|
403 | 404 | ; will be understood by `def`. |
404 | 405 | [_ |
405 | 406 | (syntax-parse stx |
406 | | - [(_ x:id t_unexpanded:expr |
| 407 | + [(_ x:id {~type t:type} |
407 | 408 | {~alt {~optional {~and #:exact exact?}} |
408 | 409 | {~optional f:fixity-annotation}} |
409 | 410 | ...) |
410 | 411 | #:with x- (generate-temporary #'x) |
411 | 412 | #:with exct? (and (attribute exact?) #true) |
412 | 413 | #:with fixity (attribute f.fixity) |
413 | | - #:with {~type t:type} #'t_unexpanded |
414 | 414 | #:with t_reduced (if (attribute exact?) |
415 | 415 | #'t.expansion |
416 | 416 | (type-reduce-context #'t.expansion)) |
417 | | - #:with delta (syntax-local-introduce |
418 | | - ((attribute t.scoped-binding-introducer) #'_)) |
| 417 | + #:with sbi (serialize-syntax-introducer |
| 418 | + (attribute t.scoped-binding-introducer)) |
419 | 419 | #`(begin- |
420 | 420 | (define-values- [] t.residual) |
421 | 421 | (define-syntax- x |
422 | 422 | (binding-declaration |
423 | 423 | (quote-syntax x-) |
424 | 424 | (quote-syntax t_reduced) |
425 | | - (quote-syntax delta) |
| 425 | + (quote-syntax sbi) |
426 | 426 | 'fixity)))])]))) |
427 | 427 |
|
428 | 428 | (define-syntax-parser λ1 |
|
0 commit comments