commit 149897653a7e6673963910affe874315a93e5116 parent 82b7ec004dd00020e189b3ab959c06c6d351fb1b Author: AlexKnauth <alexander@knauth.org> Date: Mon, 21 Sep 2015 18:09:58 -0400 use make-variable-like-transformer Diffstat:
| M | tapl/stlc+lit.rkt | | | 9 | ++------- |
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/tapl/stlc+lit.rkt b/tapl/stlc+lit.rkt @@ -29,13 +29,8 @@ #;(define-syntax op/tc (make-rename-transformer (assign-type #'op #'τ))) ; rename transformer doesnt seem to expand at the right time ; - op still has no type in #%app - (define-syntax (op/tc stx) - (syntax-parse stx - [f:id (⊢ #,(syntax/loc stx op) : τ)] ; HO case - [(o . rst) - #:with app (datum->syntax #'o '#%app) - #:with opp (format-id #'o "~a" #'op) - (syntax/loc stx (app opp . rst))])))])) + (define-syntax op/tc + (make-variable-like-transformer (assign-type #'op #'τ))))])) (define-primop + : (→ Int Int Int))