diff options
author | W. Kosior <koszko@koszko.org> | 2025-03-26 15:50:13 +0100 |
---|---|---|
committer | W. Kosior <koszko@koszko.org> | 2025-03-26 15:50:13 +0100 |
commit | 14fce8b9ae04d0ddc6f715fb3cbbc260e9b7e1f5 (patch) | |
tree | 9fcb0abf3de7f63ca8e444104f7e710c09d9927c | |
parent | e7d38baa9e50be295cdbe80fb3b24352d695df53 (diff) | |
download | cantius-14fce8b9ae04d0ddc6f715fb3cbbc260e9b7e1f5.tar.gz cantius-14fce8b9ae04d0ddc6f715fb3cbbc260e9b7e1f5.zip |
Export list of monad argument names.
The Cantius monad can now be "extended" through creation of a new one that
repeats all its arguments.
-rw-r--r-- | src/guile/cantius.scm | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/guile/cantius.scm b/src/guile/cantius.scm index cdf6379..e0db981 100644 --- a/src/guile/cantius.scm +++ b/src/guile/cantius.scm @@ -354,19 +354,22 @@ ;;; Cantius syntactic monad and default values to use as its arguments. ;;; -(export $) -(define-syntactic-monad $ - cant$resource-roots - cant$redirect/normalize-path? - cant$redirect/remove-query? - cant$default-headers - cant$http-code-handlers - cant$other-http-codes-handler - cant$request - cant$body - cant$current-path - cant$current-endpoint - cant$endpoint-matched-path) +(eval-when (compile load eval) + (define-public $-args + '(cant$resource-roots + cant$redirect/normalize-path? + cant$redirect/remove-query? + cant$default-headers + cant$http-code-handlers + cant$other-http-codes-handler + cant$request + cant$body + cant$current-path + cant$current-endpoint + cant$endpoint-matched-path)) + + (export $) + (eval `(define-syntactic-monad $ . ,$-args) (current-module))) (define %default-headers '((content-type . (text/plain (charset . "utf-8"))))) |