|
327 | 327 |
|
328 | 328 | (begin-for-syntax |
329 | 329 | ; fixity : [Maybe Fixity] |
330 | | - (struct val-decl [internal-id type fixity] |
| 330 | + (struct val-decl [internal-id type exact? fixity] |
331 | 331 | #:property prop:procedure |
332 | 332 | (λ (this stx) |
333 | | - (match-define (val-decl x- type _) this) |
| 333 | + (match-define (val-decl x- type _ _) this) |
334 | 334 | ((make-typed-var-transformer x- type) stx)) |
335 | 335 | #:property prop:infix-operator |
336 | 336 | (λ (this) (val-decl-fixity this))) |
337 | 337 |
|
338 | 338 | (define-syntax-class id/val-decl |
339 | | - #:attributes [internal-id type.expansion type.scoped-binding-introducer] |
| 339 | + #:attributes [internal-id |
| 340 | + type.expansion type.scoped-binding-introducer |
| 341 | + exact? |
| 342 | + fixity] |
340 | 343 | [pattern (~var x (local-value val-decl?)) |
341 | | - #:attr internal-id |
342 | | - (syntax-local-introduce |
343 | | - (val-decl-internal-id (attribute x.local-value))) |
344 | | - #:with type:type |
345 | | - (syntax-local-introduce |
346 | | - (val-decl-type (attribute x.local-value)))])) |
| 344 | + #:do [(match-define (val-decl x-* type* exact?* fixity*) |
| 345 | + (attribute x.local-value))] |
| 346 | + #:attr internal-id (syntax-local-introduce x-*) |
| 347 | + #:with type:type (syntax-local-introduce type*) |
| 348 | + #:attr exact? exact?* |
| 349 | + #:attr fixity fixity*])) |
347 | 350 |
|
348 | 351 | ;; --------------------------------------------------------------------------------------------------- |
349 | 352 |
|
|
399 | 402 | {~optional f:fixity-annotation}} |
400 | 403 | ...) |
401 | 404 | #:with x- (generate-temporary #'x) |
| 405 | + #:with exct? (and (attribute exact?) #true) |
402 | 406 | #:with fixity (attribute f.fixity) |
403 | 407 | #:with t_reduced (if (attribute exact?) |
404 | 408 | #'t.expansion |
|
407 | 411 | (let-values ([() t.residual]) |
408 | 412 | (val-decl (quote-syntax x-) |
409 | 413 | (quote-syntax t_reduced) |
| 414 | + 'exct? |
410 | 415 | 'fixity)))])]))) |
411 | 416 |
|
412 | 417 | (define-syntax-parser λ1 |
|
0 commit comments