From 040ce09735586ccc4073de82ac181b15df59bbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 1 Jun 2020 22:04:38 +0200 Subject: Define method now actually sets current-app. --- module/util/app.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/util') diff --git a/module/util/app.scm b/module/util/app.scm index 67725a8c..9c1876d0 100644 --- a/module/util/app.scm +++ b/module/util/app.scm @@ -15,7 +15,8 @@ (define current-app (make-parameter (make-app))) (define-syntax (define-method stx) - (with-syntax ((app (datum->syntax stx 'app))) + (with-syntax ((app (datum->syntax stx 'app)) + (current-app (datum->syntax stx 'current-app))) (syntax-case stx () [(_ (name args ...) body ...) @@ -23,7 +24,8 @@ #'(args ...)))) #`(define*-public (name #,@pre #,@(if (null? post) '(key:) post) (app (current-app))) - body ...))]))) + (parameterize ((current-app app)) + body ...)))]))) (define-method (getf field) -- cgit v1.2.3