From 507e8e9043212394a2122789ed68acd31985b116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Tue, 4 Jul 2023 20:51:32 +0200 Subject: [PATCH] Improve gen-duck formatting. --- doc/d-utils.md | 4 ++++ src/duck-extract.scm | 2 ++ src/gendoc.scm | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/d-utils.md b/doc/d-utils.md index 99d2ad9..ba7d0c8 100644 --- a/doc/d-utils.md +++ b/doc/d-utils.md @@ -1,7 +1,11 @@ # Utility modules +These are various utility modules for other HackerBase libraries. + ## util-time [module] + (import util-time) + Compatibility time module for <5.2 and >=5.3 versions of CHICKEN. ### current-util-milliseconds [procedure] diff --git a/src/duck-extract.scm b/src/duck-extract.scm index 88a4f3d..6953a5c 100644 --- a/src/duck-extract.scm +++ b/src/duck-extract.scm @@ -46,6 +46,8 @@ (define (print-duck-module sec) (print "## " (cadr sec) " [module]") (newline) + (print " (import " (cadr sec) ")") + (newline) (print-duck-text (caddr sec))) (define (print-duck-variable sec) diff --git a/src/gendoc.scm b/src/gendoc.scm index f364c86..ab44b53 100644 --- a/src/gendoc.scm +++ b/src/gendoc.scm @@ -3,12 +3,14 @@ (define-syntax gen-duck (syntax-rules () - ((_ fname title mod ...) + ((_ fname title abstract mod ...) (begin (import mod ...) (with-output-to-file fname (lambda () (print "# " title) + (newline) + (print abstract) (let () (newline) (print-module-duck mod)) @@ -17,4 +19,5 @@ (gen-duck "doc/d-utils.md" "Utility modules" + "These are various utility modules for other HackerBase libraries." util-time)