|
331 | 331 | ; forms), it searches for a `binding-declaration` and fills in `internal-id` with the |
332 | 332 | ; actual definition. The `type` field is used as the expected type of the definition. |
333 | 333 | ; fixity : [Maybe Fixity] |
334 | | - (struct binding-declaration [internal-id type delta-syntax residual fixity] |
| 334 | + (struct binding-declaration [internal-id type delta-syntax fixity] |
335 | 335 | #:property prop:procedure |
336 | 336 | (λ (this stx) |
337 | | - (match-define (binding-declaration x- type _ _ _) this) |
| 337 | + (match-define (binding-declaration x- type _ _) this) |
338 | 338 | ((make-typed-var-transformer x- type) stx)) |
339 | 339 | #:property prop:infix-operator |
340 | 340 | (λ (this) (binding-declaration-fixity this))) |
341 | 341 |
|
342 | 342 | (define-syntax-class id/binding-declaration |
343 | | - #:attributes [internal-id type scoped-binding-introducer residual fixity] |
| 343 | + #:attributes [internal-id type scoped-binding-introducer fixity] |
344 | 344 | [pattern (~var x (local-value binding-declaration?)) |
345 | | - #:do [(match-define (binding-declaration x-* type* delta* resid* fixity*) |
| 345 | + #:do [(match-define (binding-declaration x-* type* delta* fixity*) |
346 | 346 | (attribute x.local-value))] |
347 | 347 | #:attr internal-id (syntax-local-introduce x-*) |
348 | 348 | #:with type (syntax-local-introduce type*) |
349 | 349 | #:attr scoped-binding-introducer (make-syntax-delta-introducer delta* #'_) |
350 | | - #:with residual (syntax-local-introduce resid*) |
351 | 350 | #:attr fixity fixity*])) |
352 | 351 |
|
353 | 352 | (define-syntax-parser define/binding-declaration |
|
417 | 416 | (type-reduce-context #'t.expansion)) |
418 | 417 | #:with delta (syntax-local-introduce |
419 | 418 | ((attribute t.scoped-binding-introducer) #'_)) |
420 | | - #`(define-syntax x |
421 | | - (binding-declaration |
422 | | - (quote-syntax x-) |
423 | | - (quote-syntax t_reduced) |
424 | | - (quote-syntax delta) |
425 | | - (quote-syntax t.residual) |
426 | | - 'fixity))])]))) |
| 419 | + #`(begin- |
| 420 | + (define-values- [] t.residual) |
| 421 | + (define-syntax- x |
| 422 | + (binding-declaration |
| 423 | + (quote-syntax x-) |
| 424 | + (quote-syntax t_reduced) |
| 425 | + (quote-syntax delta) |
| 426 | + 'fixity)))])]))) |
427 | 427 |
|
428 | 428 | (define-syntax-parser λ1 |
429 | 429 | [(_ x:id e:expr) |
|
454 | 454 | #:with x- #'x.internal-id |
455 | 455 | (syntax-property |
456 | 456 | #`(define- x- |
457 | | - (let-values ([() x.residual]) |
458 | | - (#%expression |
459 | | - (: #,((attribute x.scoped-binding-introducer) |
460 | | - #'e) |
461 | | - x.type |
462 | | - #:exact)))) |
| 457 | + (#%expression |
| 458 | + (: #,((attribute x.scoped-binding-introducer) |
| 459 | + #'e) |
| 460 | + x.type |
| 461 | + #:exact))) |
463 | 462 | 'disappeared-use |
464 | 463 | (syntax-local-introduce #'x))] |
465 | 464 |
|
|
0 commit comments