add with-ctx shorthand

This commit is contained in:
Stephen Chang 2017-03-21 17:55:45 -04:00
parent 3d9ef8424c
commit 01799a12da

View File

@ -757,6 +757,11 @@
(define current-tag (make-parameter (type-key1))))
;; type assignment utilities --------------------------------------------------
(define-simple-macro (with-ctx ([x x- ty] ...) e ...)
(let-syntax
([x (make-variable-like-transformer (assign-type #'x- #'ty))] ...)
e ...))
(define-syntax (let*-syntax stx)
(syntax-parse stx
[(_ () . body) #'(let-syntax () . body)]