|
313 | 313 | ; forms), it searches for a `binding-declaration` and fills in `internal-id` with the |
314 | 314 | ; actual definition. The `type` field is used as the expected type of the definition. |
315 | 315 | ; fixity : [Maybe Fixity] |
316 | | - (struct binding-declaration [internal-id type delta-syntax residual fixity] |
| 316 | + (struct binding-declaration [internal-id type delta-syntax fixity] |
317 | 317 | #:property prop:procedure |
318 | 318 | (λ (this stx) |
319 | | - (match-define (binding-declaration x- type _ _ _) this) |
| 319 | + (match-define (binding-declaration x- type _ _) this) |
320 | 320 | ((make-typed-var-transformer x- type) stx)) |
321 | 321 | #:property prop:infix-operator |
322 | 322 | (λ (this) (binding-declaration-fixity this))) |
323 | 323 |
|
324 | 324 | (define-syntax-class id/binding-declaration |
325 | | - #:attributes [internal-id type scoped-binding-introducer residual fixity] |
| 325 | + #:attributes [internal-id type scoped-binding-introducer fixity] |
326 | 326 | [pattern (~var x (local-value binding-declaration?)) |
327 | | - #:do [(match-define (binding-declaration x-* type* delta* resid* fixity*) |
| 327 | + #:do [(match-define (binding-declaration x-* type* delta* fixity*) |
328 | 328 | (attribute x.local-value))] |
329 | 329 | #:attr internal-id (syntax-local-introduce x-*) |
330 | 330 | #:with type (syntax-local-introduce type*) |
331 | 331 | #:attr scoped-binding-introducer (make-syntax-delta-introducer delta* #'_) |
332 | | - #:with residual (syntax-local-introduce resid*) |
333 | 332 | #:attr fixity fixity*])) |
334 | 333 |
|
335 | 334 | (define-syntax-parser define/binding-declaration |
|
399 | 398 | (type-reduce-context #'t.expansion)) |
400 | 399 | #:with delta (syntax-local-introduce |
401 | 400 | ((attribute t.scoped-binding-introducer) #'_)) |
402 | | - #`(define-syntax x |
403 | | - (binding-declaration |
404 | | - (quote-syntax x-) |
405 | | - (quote-syntax t_reduced) |
406 | | - (quote-syntax delta) |
407 | | - (quote-syntax t.residual) |
408 | | - 'fixity))])]))) |
| 401 | + #`(begin- |
| 402 | + (define-values- [] t.residual) |
| 403 | + (define-syntax- x |
| 404 | + (binding-declaration |
| 405 | + (quote-syntax x-) |
| 406 | + (quote-syntax t_reduced) |
| 407 | + (quote-syntax delta) |
| 408 | + 'fixity)))])]))) |
409 | 409 |
|
410 | 410 | (define-syntax-parser λ1 |
411 | 411 | [(_ x:id e:expr) |
|
436 | 436 | #:with x- #'x.internal-id |
437 | 437 | (syntax-property |
438 | 438 | #`(define- x- |
439 | | - (let-values ([() x.residual]) |
440 | | - (#%expression |
441 | | - (: #,((attribute x.scoped-binding-introducer) |
442 | | - #'e) |
443 | | - x.type |
444 | | - #:exact)))) |
| 439 | + (#%expression |
| 440 | + (: #,((attribute x.scoped-binding-introducer) |
| 441 | + #'e) |
| 442 | + x.type |
| 443 | + #:exact))) |
445 | 444 | 'disappeared-use |
446 | 445 | (syntax-local-introduce #'x))] |
447 | 446 |
|
|
0 commit comments