From 7ff11cc4995570486434eb4da0223286fffe5011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 24 Apr 2019 19:39:56 +0200 Subject: Add overriding define-syntax. --- module/util.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/module/util.scm b/module/util.scm index 5e54fbc4..14b6cfde 100644 --- a/module/util.scm +++ b/module/util.scm @@ -8,9 +8,20 @@ mod! sort* sort*! find-min catch-multiple) - #:replace (let* set!) + #:replace (let* set! define-syntax) ) +((@ (guile) define-syntax) define-syntax + (syntax-rules () + ((_ (name args ...) body ...) + ((@ (guile) define-syntax) name + (lambda (args ...) + body ...))) + ((_ otherwise ...) + ((@ (guile) define-syntax) otherwise ...)))) + + + (define-public upstring->symbol (compose string->symbol string-upcase)) (define-public symbol-upcase (compose string->symbol string-upcase symbol->string)) -- cgit v1.2.3