dev-top-inverter
Matthew Butterick 6 years ago
parent 0c0a78606f
commit fc74af114f

@ -20,7 +20,8 @@
;; if `define-meta` is defined it will pop an error msg if the wrong number of args
;; even though this error will happen after macro expansion, when metas are extracted
;; empty string will merge with surroundings
(define+provide (define-meta k v) "")
(provide define-meta)
(define-syntax-rule (define-meta k v) "")
(define+provide current-metas (make-parameter #f))

@ -134,4 +134,4 @@
(define-settable index-pages '("index.html"))
(define-settable racket-style-top #f)
(define-settable allow-unbound-ids #true)

@ -5,12 +5,12 @@
(define-syntax (top~ stx)
(syntax-case stx ()
[(_ . ID)
(setup:racket-style-top)
#'(#%top . ID)]
(setup:allow-unbound-ids)
#'(#%app make-default-tag-function 'ID)]
[(_ . ID)
#'(#%app make-default-tag-function 'ID)]))
#'(def/c ID)]))
(define-syntax (def/c stx)
(syntax-case stx ()
[(_ X) (identifier-binding #'X) #'X]
[(_ X) #'(#%top . X)]))
[(_ ID) (identifier-binding #'ID) #'ID]
[(_ ID) #'(#%top . ID)]))
Loading…
Cancel
Save