aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-07-19 14:42:36 +0300
committerBonfaceKilz2023-07-30 12:29:56 +0300
commit54b54584215289dd394c1935aaa2775afd6c2863 (patch)
treee0d1d27d90434d874249d4c432734b42e2f35e1c
parentf7542c86fd6f63c0315776953d734eaef502d667 (diff)
downloadgn-transform-databases-54b54584215289dd394c1935aaa2775afd6c2863.tar.gz
Only document a triple if it exists
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r--dump/special-forms.scm15
1 files changed, 8 insertions, 7 deletions
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: