refactor top

pull/150/head
Matthew Butterick 7 years ago
parent 69a5db2cd7
commit 0190c3e1df

@ -1 +1 @@
1502063629 1502063717

@ -8,12 +8,12 @@
;; To suppress this behavior, use def/c to wrap any name. ;; To suppress this behavior, use def/c to wrap any name.
;; If that name isn't already defined, you'll get the usual syntax error. ;; If that name isn't already defined, you'll get the usual syntax error.
(define-syntax-rule (top~ . id) (define-syntax-rule (top~ . ID)
(make-default-tag-function 'id)) (make-default-tag-function 'ID))
(define-syntax (def/c stx) (define-syntax (def/c stx)
(syntax-case stx () (syntax-case stx ()
[(_ x) [(_ X)
(if (identifier-binding #'x ) (if (identifier-binding #'X )
#'x #'X
#'(#%top . x))])) #'(#%top . X))]))
Loading…
Cancel
Save