From 54b54584215289dd394c1935aaa2775afd6c2863 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 19 Jul 2023 14:42:36 +0300 Subject: Only document a triple if it exists Signed-off-by: Munyoki Kilyungi --- dump/special-forms.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'dump/special-forms.scm') diff --git a/dump/special-forms.scm b/dump/special-forms.scm index 283fcc2..a356783 100644 --- a/dump/special-forms.scm +++ b/dump/special-forms.scm @@ -448,13 +448,14 @@ must be remedied." #,(syntax-case #'schema-triples-clause (schema-triples) ((schema-triples (triple-subject triple-predicate triple-object) ...) #`(begin - (format #t "## Schema Triples:~%~%```text~%") - (for-each (lambda (s p o) - (format #t "~a -> ~a -> ~a~%" s p o)) - (list 'triple-subject ...) - (list 'triple-predicate ...) - (list 'triple-object ...)) - (format #t "```"))) + (when (not (list 'triple-subject ...)) + (format #t "## Schema Triples:~%~%```text~%") + (for-each (lambda (s p o) + (format #t "~a -> ~a -> ~a~%" s p o)) + (list 'triple-subject ...) + (list 'triple-predicate ...) + (list 'triple-object ...)) + (format #t "```")))) (_ (error "Invalid schema triples clause:" #'schema-triples-clause))) (format #t " ## Generated Triples: -- cgit v1.2.3